/* AmalNameh Modern Persian RTL Design System */
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

:root {
    --primary-color: #1e3a8a;
    --primary-light: #3b82f6;
    --primary-dark: #172554;
    --accent-color: #0d9488;
    --danger-color: #e11d48;
    --warning-color: #f59e0b;
    --success-color: #10b981;
    --bg-light: #f8fafc;
    --surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
}

body {
    direction: rtl;
    text-align: right;
    font-family: 'Vazirmatn', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Tahoma, Arial, sans-serif !important;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.7;
    margin: 0;
    padding: 0;
}

* {
    font-family: 'Vazirmatn', system-ui, -apple-system, BlinkMacSystemFont, Tahoma, Arial, sans-serif;
    box-sizing: border-box;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

/* Navbar */
.an-navbar {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 12px 0;
}

.an-navbar .navbar-brand {
    font-weight: 800;
    font-size: 1.4rem;
    color: #fff !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.an-navbar .nav-link {
    color: #e2e8f0 !important;
    font-size: 0.95rem;
    padding: 8px 14px !important;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.an-navbar .nav-link:hover, .an-navbar .nav-link.active {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.12);
}

.btn-an-glow {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff !important;
    font-weight: 600;
    border-radius: 8px;
    padding: 8px 18px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    border: none;
}

.btn-an-glow:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

/* Cards & Surfaces */
.an-card {
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
    padding: 24px;
    margin-bottom: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.an-card:hover {
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
}

.an-card-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 14px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.an-card-title {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-main);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Stat Widgets */
.an-stat-widget {
    background: #ffffff;
    border-radius: 14px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 12px rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
}

.an-stat-widget::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 5px;
    background: var(--primary-light);
}

.an-stat-widget.danger::before { background: var(--danger-color); }
.an-stat-widget.success::before { background: var(--success-color); }
.an-stat-widget.warning::before { background: var(--warning-color); }

.an-stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}

.an-stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.an-stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Badges */
.badge-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-approved { background: #dcfce7; color: #166534; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-rejected { background: #fee2e2; color: #991b1b; }
.badge-deactivated { background: #e2e8f0; color: #475569; }

/* Stars */
.star-rating {
    color: #f59e0b;
    font-size: 1.2rem;
}

/* Hero Section */
.an-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #0d9488 100%);
    color: white;
    padding: 60px 0 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.an-hero h1 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 16px;
}

.an-hero p {
    font-size: 1.15rem;
    color: #e2e8f0;
    max-width: 800px;
    margin: 0 auto 30px auto;
}

/* Search Tabs */
.search-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 12px;
}

.search-tab-btn {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-tab-btn:hover {
    border-color: var(--primary-light);
    color: var(--primary-light);
}

.search-tab-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

/* Sidebar for Panels */
.dashboard-container {
    display: flex;
    min-height: calc(100vh - 70px);
}

.dashboard-sidebar {
    width: 280px;
    background: #0f172a;
    color: #cbd5e1;
    padding: 24px 16px;
    flex-shrink: 0;
}

.dashboard-sidebar .user-info {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #1e293b;
    margin-bottom: 20px;
}

.dashboard-sidebar .user-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px auto;
    font-size: 1.8rem;
    color: var(--primary-light);
    border: 2px solid var(--primary-light);
}

.dashboard-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #94a3b8;
    border-radius: 10px;
    margin-bottom: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dashboard-nav-item:hover, .dashboard-nav-item.active {
    background: #1e293b;
    color: #ffffff;
}

.dashboard-content {
    flex-grow: 1;
    padding: 30px;
    background: #f8fafc;
    overflow-x: hidden;
}

/* Forms */
.form-control, .form-select {
    border-radius: 10px;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    font-size: 0.95rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

/* Media Players */
.evidence-media-card {
    border-radius: 12px;
    overflow: hidden;
    background: #0f172a;
    border: 1px solid var(--border-color);
    margin-bottom: 14px;
    text-align: center;
}

.evidence-media-card img {
    max-width: 100%;
    max-height: 250px;
    object-fit: cover;
}

/* Print / Judicial Export */
@media print {
    body {
        background: white !important;
        color: black !important;
        font-size: 11pt;
    }
    .no-print, .an-navbar, .dashboard-sidebar, footer {
        display: none !important;
    }
    .dashboard-content {
        padding: 0 !important;
    }
    .an-card {
        box-shadow: none !important;
        border: 1px solid #000 !important;
        page-break-inside: avoid;
    }
}
