/* Modern CI Conformity Check - Minimalistic UI */

:root {
    /* Colors */
    --bvr-blue: #005AA0;  /* HKS 44 */
    --bvr-blue-dark: #004680;
    --sidebar-bg: #FFFFFF;
    --sidebar-hover: #F5F5F5;
    --sidebar-text: #333333;
    --text-light: #E5E5E5;
    --main-bg: #F8F8F8;
    --card-bg: #FFFFFF;
    --text-primary: #111111;
    --text-muted: #999999;
    --border-color: #E5E5E5;
    --pill-success: #25AE5F;
    --hover-bg: #F3F3F3;
    --orange-accent: #FF8C00;

    /* Shadows */
    --shadow-sm: 0px 2px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0px 3px 6px rgba(0, 0, 0, 0.04);

    /* Border Radius */
    --radius-card: 12px;
    --radius-lg: 14px;
    --radius-pill: 20px;

    /* Font Sizes */
    --title-xl: 32px;
    --title-lg: 22px;
    --text-body: 16px;
    --text-small: 13px;
    --text-xs: 11px;

    /* Spacing */
    --sidebar-width: 240px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--main-bg);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
}

.sidebar .logo {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.sidebar__logo-placeholder {
    width: 180px;
    height: 60px;
    background: #f0f0f0;
    border: 2px dashed #ccc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #999;
    text-align: center;
    padding: 4px;
}

.sidebar .logo h1 {
    font-size: 16px;
    font-weight: 600;
    color: var(--sidebar-text);
    letter-spacing: -0.01em;
    margin: 0;
}

.sidebar nav {
    flex: 1;
}

.sidebar .nav-item {
    display: block;
    padding: 12px 20px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: var(--text-body);
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    position: relative;
}

.sidebar .nav-item:hover {
    background: var(--sidebar-hover);
    color: var(--bvr-blue);
}

.sidebar .nav-item.active {
    color: var(--bvr-blue);
    background: var(--sidebar-hover);
    border-left-color: var(--orange-accent);
}

/* Sidebar User Section at Bottom */
.sidebar__user-section {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.sidebar__user-control {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--main-bg);
    border-radius: 8px;
}

.sidebar__user-control svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.sidebar__user-control span {
    font-weight: 400;
    color: var(--text-primary);
    font-size: var(--text-small);
    flex: 1;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.sidebar__logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
}

.sidebar__logout-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

.sidebar__logout-btn svg {
    display: block;
}

.sidebar .recent-section {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar .recent-title {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.sidebar .recent-item {
    display: block;
    padding: 8px 0;
    color: var(--text-muted);
    font-size: var(--text-small);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

.sidebar .recent-item:hover {
    color: var(--text-light);
    background: var(--sidebar-hover);
    padding-left: 8px;
    padding-right: 8px;
    margin-left: -8px;
    margin-right: -8px;
}

.sidebar .user-section {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar .user-info {
    color: var(--text-muted);
    font-size: var(--text-small);
    margin-bottom: 8px;
}

.sidebar .logout-btn {
    display: inline-block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: var(--text-small);
    transition: color 0.2s;
}

.sidebar .logout-btn:hover {
    color: var(--text-light);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content.full-width {
    margin-left: 0;
}

/* Top Bar */
.topbar {
    background: var(--card-bg);
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 40px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar__icon-placeholder {
    height: 50px;
    width: 50px;
    background: #f0f0f0;
    border: 2px dashed #ccc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #999;
    text-align: center;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px;
    flex: 1;
    width: 100%;
}

/* Welcome Section */
.welcome-section {
    margin-bottom: 40px;
}

.welcome-title {
    font-size: var(--title-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

/* Hero Card - Solid BVR Blue */
.hero-card {
    background: var(--bvr-blue);
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-bottom: 32px;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    filter: blur(60px);
    pointer-events: none;
}

.hero-card-content {
    position: relative;
    z-index: 1;
}

.hero-card h2 {
    font-size: var(--title-lg);
    font-weight: 600;
    margin-bottom: 12px;
    color: white;
}

.hero-card p {
    font-size: var(--text-body);
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
}

/* Info Cards Grid */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.info-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s, box-shadow 0.2s;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.08);
}

.info-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--main-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.info-card-content h3 {
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.info-card-content p {
    font-size: var(--text-small);
    color: var(--text-muted);
}

/* Card Component */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-md);
    padding: 32px;
    margin-bottom: 32px;
}

.card-header {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
    font-size: var(--title-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.card-header .subtitle {
    font-size: var(--text-small);
    color: var(--text-muted);
}

/* Form Elements */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: var(--text-small);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: var(--text-body);
    transition: all 0.2s;
    background: var(--card-bg);
    color: var(--text-primary);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.05);
}

/* File Upload */
.file-input-wrapper input[type="file"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: var(--text-body);
    background: var(--card-bg);
    cursor: pointer;
}

.file-input-wrapper input[type="file"]::file-selector-button {
    margin-right: 16px;
    padding: 8px 20px;
    border: none;
    background: var(--text-primary);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: var(--text-small);
    transition: all 0.2s;
}

.file-input-wrapper input[type="file"]::file-selector-button:hover {
    background: #2a2a2a;
}

.helper-text {
    display: block;
    margin-top: 6px;
    font-size: var(--text-small);
    color: var(--text-muted);
}

/* Info Box */
.info-box {
    background: var(--main-bg);
    border-left: 3px solid var(--text-primary);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.info-box h3 {
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.info-box ol {
    margin-left: 20px;
    color: var(--text-muted);
    font-size: var(--text-small);
}

.info-box li {
    margin-bottom: 8px;
    padding-left: 8px;
}

.info-box strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-size: var(--text-body);
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    gap: 8px;
    min-width: 180px;
}

.btn-primary {
    background: var(--text-primary);
    color: white;
}

.btn-primary:hover {
    background: #2a2a2a;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--main-bg);
    border-color: var(--text-primary);
}

/* Table */
.table-container {
    background: var(--card-bg);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 32px;
}

.table-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.table-header h2 {
    font-size: var(--title-lg);
    font-weight: 600;
    color: var(--text-primary);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead th {
    text-align: left;
    padding: 16px 24px;
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

.table tbody .table-row {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.table tbody .table-row:hover {
    background: var(--hover-bg);
}

.table tbody .table-row:last-child {
    border-bottom: none;
}

.table tbody td {
    padding: 20px 24px;
    font-size: var(--text-body);
    color: var(--text-primary);
}

.table tbody td.text-muted {
    color: var(--text-muted);
    font-size: var(--text-small);
}

/* Status Pills */
.pill-success {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(37, 174, 95, 0.15);
    color: var(--pill-success);
    border-radius: var(--radius-pill);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pill-processing {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255, 165, 0, 0.15);
    color: #ff9800;
    border-radius: var(--radius-pill);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pill-error {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(211, 47, 47, 0.15);
    color: #d32f2f;
    border-radius: var(--radius-pill);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Status Bar */
.status-bar {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.status-icon {
    font-size: 24px;
}

.status-text {
    font-weight: 500;
    font-size: var(--text-body);
    color: var(--text-primary);
}

/* Results Output */
.results-output {
    background: var(--card-bg);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-md);
    padding: 32px;
    min-height: 400px;
}

.stream-content {
    font-size: var(--text-body);
    line-height: 1.7;
}

/* Download Section */
.download-section {
    background: var(--main-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    padding: 32px;
    text-align: center;
    margin-top: 24px;
}

.download-section h3 {
    font-size: var(--title-lg);
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

/* Login Page */
.login-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.08);
    padding: 48px;
    width: 100%;
    max-width: 440px;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header h1 {
    font-size: var(--title-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.login-header p {
    font-size: var(--text-small);
    color: var(--text-muted);
}

.error-message {
    background: rgba(211, 47, 47, 0.1);
    border: 1px solid rgba(211, 47, 47, 0.3);
    border-radius: 8px;
    color: #d32f2f;
    padding: 12px 16px;
    margin-bottom: 24px;
    font-size: var(--text-small);
}

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

.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-240px);
        z-index: 1000;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .info-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 24px 16px;
    }

    .welcome-title {
        font-size: 24px;
    }

    .hero-card {
        padding: 28px 24px;
    }

    .card {
        padding: 24px 20px;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .table tbody td {
        padding: 16px;
        font-size: var(--text-small);
    }
}

/* No sidebar for login */
body.no-sidebar {
    display: block;
}

body.no-sidebar .main-content {
    margin-left: 0;
}
