/* Al-Haseen Insurance Portal - Premium Dark Theme */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&display=swap');

:root {
    --primary: #d4a017;
    --primary-light: #f0c040;
    --primary-dark: #b8860b;
    --accent: #00d4ff;
    --accent2: #7c3aed;
    --bg-dark: #080d1a;
    --bg-card: rgba(15, 22, 41, 0.85);
    --bg-glass: rgba(255,255,255,0.03);
    --text: #e8e8e8;
    --text-muted: #8892a4;
    --border: rgba(212,160,23,0.15);
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --radius: 16px;
    --shadow: 0 8px 32px rgba(0,0,0,0.4);
}

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

body {
    font-family: 'Tajawal', sans-serif;
    background: var(--bg-dark);
    background-image: 
        radial-gradient(ellipse at 20% 50%, rgba(212,160,23,0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(0,212,255,0.03) 0%, transparent 50%);
    color: var(--text);
    min-height: 100vh;
    direction: rtl;
    line-height: 1.7;
}

/* Header / Navbar */
.portal-nav {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1000;
    background: rgba(8,13,26,0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
}

.nav-brand img {
    width: 42px;
    height: 42px;
    border-radius: 12px;
}

.nav-brand span {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s;
    padding: 8px 16px;
    border-radius: 8px;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
    background: rgba(212,160,23,0.1);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-user .avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.btn-login, .btn-register {
    padding: 8px 20px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    border: none;
}

.btn-login {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-login:hover {
    background: rgba(212,160,23,0.1);
}

.btn-register {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #000;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(212,160,23,0.3);
}

/* Main Content */
.portal-main {
    padding-top: 90px;
    min-height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-bottom: 3rem;
}

/* Auth Pages */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 70px);
    padding: 2rem;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 3rem;
    width: 100%;
    max-width: 480px;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 1.6rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-card .subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(212,160,23,0.1);
    background: rgba(255,255,255,0.06);
}

.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238892a4' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #000;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(212,160,23,0.35);
}

.btn-secondary {
    background: rgba(255,255,255,0.05);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--primary);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* Dashboard Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(212,160,23,0.1), transparent);
    border-radius: 0 var(--radius) 0 80px;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 30px rgba(212,160,23,0.15);
}

.stat-card .icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.stat-card .icon.gold { background: rgba(212,160,23,0.15); color: var(--primary); }
.stat-card .icon.blue { background: rgba(0,212,255,0.15); color: var(--accent); }
.stat-card .icon.green { background: rgba(16,185,129,0.15); color: var(--success); }
.stat-card .icon.purple { background: rgba(124,58,237,0.15); color: var(--accent2); }

.stat-card h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.stat-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Insurance Products */
.products-section {
    margin: 3rem 0;
}

.products-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transition: transform 0.4s;
}

.product-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 12px 40px rgba(212,160,23,0.15);
}

.product-card:hover::after {
    transform: scaleX(1);
}

.product-card .product-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.2rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: linear-gradient(135deg, rgba(212,160,23,0.1), rgba(0,212,255,0.05));
    border: 1px solid var(--border);
}

.product-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-light);
}

.product-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.data-table th {
    background: rgba(212,160,23,0.08);
    padding: 14px 16px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--primary-light);
    text-align: right;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 0.9rem;
}

.data-table tr:hover td {
    background: rgba(212,160,23,0.03);
}

/* Status Badges */
.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.badge-success { background: rgba(16,185,129,0.15); color: #10b981; }
.badge-warning { background: rgba(245,158,11,0.15); color: #f59e0b; }
.badge-danger { background: rgba(239,68,68,0.15); color: #ef4444; }
.badge-info { background: rgba(59,130,246,0.15); color: #3b82f6; }
.badge-pending { background: rgba(156,163,175,0.15); color: #9ca3af; }

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Steps / Wizard */
.wizard-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 2.5rem;
    padding: 0 1rem;
}

.wizard-step {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wizard-step .step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    background: rgba(255,255,255,0.05);
    border: 2px solid var(--border);
    color: var(--text-muted);
    transition: all 0.3s;
}

.wizard-step.active .step-num {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: var(--primary);
    color: #000;
}

.wizard-step.done .step-num {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

.wizard-step .step-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.wizard-step.active .step-label {
    color: var(--primary);
    font-weight: 600;
}

.wizard-line {
    width: 40px;
    height: 2px;
    background: var(--border);
    margin: 0 8px;
}

.wizard-line.done {
    background: var(--success);
}

/* Alert Messages */
.alert {
    padding: 14px 20px;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3); color: #10b981; }
.alert-danger { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #ef4444; }
.alert-warning { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3); color: #f59e0b; }
.alert-info { background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.3); color: #3b82f6; }

/* Mobile Responsive */
@media (max-width: 768px) {
    .portal-nav { padding: 0 1rem; }
    .nav-links { display: none; }
    .auth-card { padding: 2rem 1.5rem; }
    .form-row { grid-template-columns: 1fr; }
    .product-cards { grid-template-columns: 1fr; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .wizard-steps { flex-wrap: wrap; }
    .wizard-line { display: none; }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Page Title */
.page-title {
    margin-bottom: 2rem;
}

.page-title h1 {
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
}

.page-title p {
    color: var(--text-muted);
}

/* Card Section */
.card-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.card-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
    color: var(--primary-light);
    display: flex;
    align-items: center;
    gap: 8px;
}
