/* Keltion v3 - Semantic Component CSS */
@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;600&family=Onest:wght@200;300;400;500;600&display=swap');

:root {
    /* Brand Colors */
    --color-brand: #579390;
    --color-brand-dark: #467674;
    --color-brand-light: #e2f7f6;
    --color-text-main: #1f2933;
    --color-text-muted: #6f6f6f;
    --color-text-low: #7b8794;
    --color-border: #e6e9ed;
    --color-bg-app: #fcfdfe;
    --color-bg-card: #ffffff;
    --color-error: #f43f5e;
    --color-warning: #f59e0b;
    --color-success: #10b981;

    /* Tokens */
    --max-content-width: 1196px;
    --header-height: 129px;
    --font-primary: 'Onest', sans-serif;
    --font-brand: 'Comfortaa', cursive;
    --font-mono: 'JetBrains Mono', monospace;
    --radius-default: 8px;
    --radius-large: 16px;
    --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-floating: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* --- Resets --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--color-bg-app);
    color: var(--color-text-main);
    font-family: var(--font-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    align-items: center;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

ul {
    list-style: none;
}

/* --- Layout Containers --- */
.container {
    width: 100%;
    max-width: var(--max-content-width);
    margin: 0 auto;
}

.main-content {
    padding: 48px 0;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* --- Header Component --- */
.app-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.app-header .logo {
    font-family: var(--font-brand);
    font-size: 20px;
    font-weight: 400;
}

.app-navigation {
    display: flex;
    align-items: center;
    gap: 44px;
    flex-shrink: 0;
}

.app-navigation a {
    font-size: 20px;
    font-weight: 400;
    color: var(--color-text-main);
}

.app-navigation a:hover {
    color: var(--color-brand);
}

.user-profile-card {
    width: 314px;
    height: 76px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-default);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 12px;
}

.user-profile-card .avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #f1f5f9;
    overflow: hidden;
}

.user-profile-card .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-profile-card .info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.user-profile-card .name {
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
    margin-bottom: 2px;
}

.user-profile-card .company {
    font-size: 13px;
    font-weight: 300;
    color: var(--color-text-low);
}

/* --- Hero Component --- */
.hero-banner {
    height: 254px;
    background: linear-gradient(-79deg, #e2f7f6 19.3%, #f5f5f5 54.1%);
    border-radius: var(--radius-large);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 32px;
}

.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hero-content .subtitle {
    font-family: var(--font-brand);
    font-size: 24px;
    color: var(--color-brand);
    line-height: 1;
}

.hero-content .title {
    font-family: var(--font-brand);
    font-size: 40px;
    font-weight: 600;
    line-height: 1;
}

.search-input-wrapper {
    width: 332px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-default);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 8px;
}

.search-input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 20px;
    color: var(--color-text-muted);
}

.hero-preview {
    width: 327px;
    height: 206px;
    background: white;
    border: 3px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-default) var(--radius-default) 0 0;
    box-shadow: var(--shadow-floating);
    overflow: hidden;
}

.hero-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

/* --- Status Components --- */
.status-section {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-large);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    box-shadow: var(--shadow-soft);
}

.status-section .section-title {
    font-family: var(--font-brand);
    font-size: 24px;
    font-weight: 500;
}

.status-items-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.status-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.status-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-brand);
}

.status-item-header .title {
    font-size: 16px;
    font-weight: 500;
}

.status-item-header .timestamp {
    font-size: 13px;
    font-weight: 300;
    color: var(--color-text-low);
}

.status-history-bar {
    height: 26px;
    display: flex;
    gap: 8px;
    /* Figma: 12px interval - 4px segment = 8px gap */
    width: 100%;
    justify-content: space-between;
}

.status-segment {
    flex: 1;
    height: 100%;
    border-radius: 2px;
    background: var(--color-border);
    max-width: 4px;
    /* Figma segments are thin vectors */
    min-width: 2px;
}

/* Floating Shared Tooltip for "Gliding" effect */
.floating-tooltip {
    position: fixed;
    background: rgba(31, 41, 51, 0.95);
    backdrop-filter: blur(4px);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 400;
    font-family: var(--font-primary);
    white-space: nowrap;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition:
        left 0.2s cubic-bezier(0.23, 1, 0.32, 1),
        top 0.2s cubic-bezier(0.23, 1, 0.32, 1),
        opacity 0.2s ease,
        transform 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.floating-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Tooltip Arrow */
.floating-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(31, 41, 51, 0.95);
}

.status-segment.active {
    background: var(--color-brand);
}

.status-segment.warning {
    background: var(--color-warning);
}

.status-segment.error {
    background: var(--color-error);
}

/* --- Utility Classes (Limited) --- */
.text-brand {
    color: var(--color-brand);
}

.success {
    background-color: var(--color-success) !important;
}

.warning {
    background-color: var(--color-warning) !important;
}

.error {
    background-color: var(--color-error) !important;
}

/* --- Grid System --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.stat-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-default);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: var(--shadow-soft);
}

.stat-card .label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-low);
}

.stat-card .value {
    font-family: var(--font-brand);
    font-size: 24px;
    font-weight: 600;
}

/* --- Animations --- */
.animate-fade {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}