/* Import shared styles */
@import url('style.css');

/* Auth Screen */
.auth-screen {
    display: flex;
    min-height: 100vh;
    background: linear-gradient(135deg, #1b365d 0%, #2a9d8f 100%);
    justify-content: center;
    align-items: center;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 48px 32px;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: #1b365d;
}

.auth-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #1b365d, #2a9d8f);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 24px;
}

.auth-subtitle {
    text-align: center;
    color: #6b7280;
    margin-bottom: 32px;
    font-size: 14px;
}

/* App Shell */
.app-shell {
    display: flex;
    min-height: 100vh;
    background-color: #f8f9fa;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background: white;
    border-right: 1px solid #e5e7eb;
    padding: 24px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 50;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px;
    margin-bottom: 32px;
    font-weight: 700;
    color: #1b365d;
    font-size: 16px;
}

.sidebar-logo-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #1b365d, #2a9d8f);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.nav-item {
    padding: 12px 20px;
    margin: 0 12px 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-item:hover {
    background: #f0f1f3;
    color: #1b365d;
}

.nav-item.active {
    background: #ecfdf5;
    color: #2a9d8f;
    font-weight: 600;
}

.nav-icon {
    font-size: 18px;
}

/* Main Content */
.main-content {
    margin-left: 240px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.navbar-org {
    font-size: 16px;
    font-weight: 600;
    color: #1b365d;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.notification-icon {
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.2s;
}

.notification-icon:hover {
    transform: scale(1.1);
}

/* Tab Content */
.tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Header Section */
.header-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.header-section h1 {
    color: #1b365d;
    margin: 0;
}

.subtitle {
    color: #6b7280;
    margin: 4px 0 0 0;
    font-size: 14px;
}

/* Score Card */
.score-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.score-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.score-header h2 {
    color: #1b365d;
    margin: 0;
    font-size: 20px;
}

.score-date {
    font-size: 12px;
    color: #6b7280;
}

.score-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.gauge-container {
    display: flex;
    justify-content: center;
}

.score-stats {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.stat {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-label {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: #1b365d;
    line-height: 1;
}

.stat-value.danger {
    color: #ef4444;
}

.stat-detail {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

/* Chart Card */
.chart-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.chart-card h3 {
    color: #1b365d;
    margin-bottom: 24px;
}

/* Modules Grid */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.module-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.module-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.module-header h3 {
    color: #1b365d;
    margin: 0;
    font-size: 15px;
}

.status-badge {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.status-compliant {
    background: #d1fae5;
    color: #065f46;
}

.status-warning {
    background: #fef3c7;
    color: #92400e;
}

.status-danger {
    background: #fee2e2;
    color: #991b1b;
}

.module-card p {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 12px 0;
}

.progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Gap Analysis Section */
.gap-section {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.gap-section h3 {
    color: #1b365d;
    margin-bottom: 24px;
}

.gap-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gap-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 16px;
    border-left: 4px solid;
    border-radius: 8px;
    background: #f8f9fa;
}

.gap-critical {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.gap-warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.gap-severity {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.gap-critical .gap-severity {
    background: #ef4444;
    color: white;
}

.gap-warning .gap-severity {
    background: #f59e0b;
    color: white;
}

.gap-info {
    border-left-color: #3b82f6;
}

.gap-info .gap-severity {
    background: #3b82f6;
    color: white;
}

.gap-title {
    font-weight: 600;
    color: #1b365d;
    margin-bottom: 4px;
}

.gap-detail {
    font-size: 13px;
    color: #6b7280;
}

.gap-action {
    text-align: right;
}

/* Documents Grid */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.document-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}

.document-card:hover {
    border-color: #2a9d8f;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.doc-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.doc-name {
    font-weight: 600;
    color: #1b365d;
    margin-bottom: 4px;
    font-size: 14px;
}

.doc-date {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 12px;
}

.doc-status {
    margin-bottom: 16px;
}

.doc-actions {
    display: flex;
    gap: 8px;
}

.doc-actions .btn {
    flex: 1;
    font-size: 12px;
}

/* Staff Table */
.staff-table-wrapper {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

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

.staff-table thead {
    background: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
}

.staff-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.staff-table td {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    color: #333;
}

.staff-table tbody tr:hover {
    background: #f8f9fa;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

/* Reports Grid */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.report-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.report-header {
    margin-bottom: 16px;
}

.report-header h3 {
    color: #1b365d;
    margin: 0 0 4px 0;
}

.report-date {
    font-size: 12px;
    color: #6b7280;
}

.report-content {
    padding: 16px 0;
    border: 1px solid #e5e7eb;
    border-left: none;
    border-right: none;
    margin: 16px 0;
}

.report-content p {
    margin: 8px 0;
    font-size: 14px;
}

.report-actions {
    display: flex;
    gap: 8px;
}

.report-actions .btn {
    flex: 1;
}

/* Settings Grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

.settings-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.settings-card h3 {
    color: #1b365d;
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.checkbox-label input {
    cursor: pointer;
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed #2a9d8f;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    background: #f0fdf9;
    cursor: pointer;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.upload-zone p {
    margin: 8px 0;
    color: #6b7280;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 32px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #6b7280;
    cursor: pointer;
    width: 32px;
    height: 32px;
}

.modal-content h2 {
    color: #1b365d;
    margin-bottom: 8px;
}

.modal-content > p {
    font-size: 14px;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }

    .main-content {
        margin-left: 200px;
    }

    .navbar {
        padding: 0 16px;
    }

    .tab-content {
        padding: 16px;
    }

    .header-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .score-body {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .modules-grid {
        grid-template-columns: 1fr;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .reports-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 100%;
        position: absolute;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        padding: 12px 0;
    }

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

    .navbar {
        padding: 0 12px;
        flex-direction: column;
        height: auto;
        gap: 12px;
    }

    .staff-table {
        font-size: 12px;
    }

    .staff-table th,
    .staff-table td {
        padding: 8px;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }
}
