@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&display=swap');

:root {
    --primary-navy: #153247;
    --primary-navy-dark: #102637;
    --primary-navy-soft: #eaf1f6;
    --emerald-green: #0f766e;
    --emerald-green-dark: #115e59;
    --emerald-green-soft: #e8f7f4;
    --gold-accent: #b08a4a;
    --gold-accent-dark: #8f6f36;
    --gold-accent-soft: #fbf5e9;
    --danger: #b4233a;
    --danger-soft: #fff1f3;
    --info: #2f6f9f;
    --info-soft: #edf6fb;
    --bg-light-gray: #f5f7fa;
    --surface: #ffffff;
    --surface-soft: #f9fbfc;
    --white-pure: #ffffff;
    --text-dark: #1f2f3f;
    --text-body: #3f4f5f;
    --text-muted: #6b7785;
    --border-color: #dce5ee;
    --shadow-sm: 0 6px 16px rgba(21, 50, 71, 0.06);
    --shadow-md: 0 14px 34px rgba(21, 50, 71, 0.09);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    background:
        radial-gradient(circle at top right, rgba(15, 118, 110, 0.08), transparent 30%),
        linear-gradient(180deg, #fbfdff 0%, var(--bg-light-gray) 100%);
    color: var(--text-body);
    direction: rtl;
    text-align: right;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Cairo', 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 15px;
    line-height: 1.75;
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: inherit;
}

.main-header {
    background:
        linear-gradient(135deg, var(--primary-navy-dark) 0%, var(--primary-navy) 58%, #17463f 100%);
    color: var(--white-pure);
    padding: 16px 20px;
    border-bottom: 3px solid var(--gold-accent);
    box-shadow: 0 10px 26px rgba(21, 50, 71, 0.14);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 15px;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand-text h1 {
    font-size: 16px;
    font-weight: 800;
    color: var(--white-pure);
    line-height: 1.5;
}

.brand-text h2 {
    font-size: 14px;
    font-weight: 600;
    color: #d7e4ec;
    line-height: 1.5;
}

.brand-text h3 {
    font-size: 12px;
    font-weight: 700;
    color: #ead8b4;
    line-height: 1.5;
}

.system-title-center h2 {
    font-size: 20px;
    color: var(--white-pure);
    font-weight: 800;
    letter-spacing: 0;
}

.user-meta-zone {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    backdrop-filter: blur(8px);
}

.user-badge-role {
    background: rgba(255, 255, 255, 0.10);
    color: #e7f0f4;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 800;
    border-radius: 999px;
}

.btn-logout {
    color: #ffd5d9;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}

.btn-logout:hover {
    color: #ffffff;
}

.main-content-wrapper {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 30px auto;
    padding: 0 20px;
}

.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 0;
}

.login-card {
    background: var(--surface);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 450px;
    border: 1px solid var(--border-color);
    border-top: 5px solid var(--emerald-green);
}

.login-card h3 {
    margin-bottom: 25px;
    color: var(--primary-navy);
    text-align: center;
    font-weight: 800;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 14px;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    background: #fff;
    color: var(--text-dark);
}

.form-control:hover {
    border-color: #c8d6e2;
}

.form-control:focus {
    outline: none;
    border-color: var(--emerald-green);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    gap: 7px;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background-color: var(--primary-navy);
    color: white;
    box-shadow: 0 8px 16px rgba(21, 50, 71, 0.16);
}

.btn-primary:hover {
    background-color: var(--primary-navy-dark);
}

.btn-success {
    background-color: var(--emerald-green);
    color: white;
    box-shadow: 0 8px 16px rgba(15, 118, 110, 0.16);
}

.btn-success:hover {
    background-color: var(--emerald-green-dark);
}

.btn-secondary {
    background-color: #64748b;
    color: white;
}

.btn-block {
    width: 100%;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.94);
    padding: 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    border-right: 5px solid #cbd6df;
}

.stat-card.total { border-right-color: var(--primary-navy); }
.stat-card.new { border-right-color: var(--info); }
.stat-card.accepted { border-right-color: var(--emerald-green); }
.stat-card.rejected { border-right-color: var(--danger); }
.stat-card.review { border-right-color: var(--gold-accent); }

.stat-card h4 {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 800;
}

.stat-card .number {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.2;
}

.table-container-card {
    background: var(--surface);
    padding: 25px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}

.table-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.table-responsive-custom {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.table-responsive-custom th,
.table-responsive-custom td {
    padding: 14px 16px;
    text-align: right;
    border-bottom: 1px solid var(--border-color);
}

.table-responsive-custom th {
    background-color: var(--surface-soft);
    font-weight: 800;
    color: var(--primary-navy);
}

.table-responsive-custom tr:hover {
    background-color: #f7fbfa;
}

.wizard-container {
    background: var(--surface);
    padding: 35px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.wizard-progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.step-indicator {
    font-weight: 700;
    color: #98a4b2;
    padding: 5px 10px;
}

.step-indicator.active {
    color: var(--emerald-green);
    border-bottom: 3px solid var(--emerald-green);
}

.wizard-step-panel {
    display: none;
}

.wizard-step-panel.active {
    display: block;
}

.main-footer {
    background-color: var(--primary-navy);
    color: #c6d2dc;
    padding: 20px;
    text-align: center;
    font-size: 13px;
    border-top: 3px solid var(--gold-accent);
    margin-top: auto;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.developer-credits {
    color: var(--white-pure);
    font-weight: 700;
}

.dashboard-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    margin-top: 30px;
    padding: 10px;
}

.action-card {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    text-decoration: none !important;
    color: var(--text-body);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.action-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: rgba(15, 118, 110, 0.38);
}

.action-icon {
    font-size: 2.35rem;
    margin-left: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-content {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.action-content h4 {
    margin: 0 0 5px 0;
    font-size: 1.08rem;
    color: var(--text-dark);
    font-weight: 800;
}

.action-content p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.7;
}

@media (max-width: 768px) {
    .header-container,
    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .main-header {
        padding: 14px;
    }

    .brand-section {
        justify-content: center;
    }

    .system-title-center h2 {
        font-size: 16px;
    }

    .main-content-wrapper {
        margin: 18px auto;
        padding: 0 12px;
    }

    .login-card,
    .wizard-container,
    .table-container-card {
        padding: 20px;
        border-radius: var(--radius-md);
    }

    .table-responsive-custom th,
    .table-responsive-custom td {
        padding: 10px;
        font-size: 13px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .dashboard-actions-grid {
        grid-template-columns: 1fr;
        padding: 0;
        gap: 12px;
    }

    .action-card {
        padding: 16px;
        border-radius: var(--radius-md);
    }

    .action-icon {
        font-size: 2rem;
        margin-left: 12px;
    }
}
