/*
Theme Name: Shahr Andishan System
Theme URI: https://shahrandishan.com
Author: Shahr Andishan Development Team
Description: سامانه مدیریت هوشمند پرونده‌های شهر اندیشان - نسخه کامل و نهایی
Version: 17.3
License: GNU General Public License v2 or later
Text Domain: shahr-andishan
*/

/* ============================================
   فونت فارسی حرفه‌ای (Vazirmatn)
============================================ */
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

/* ============================================
   متغیرهای CSS
============================================ */
:root {
    --primary: #d4af37;
    --primary-dark: #b8941f;
    --primary-light: #f4e4a6;
    --secondary: #1a3a5c;
    --secondary-dark: #0f2744;
    --secondary-light: #2c5282;
    --accent: #cd853f;
    --dark: #1a1a2e;
    --darker: #0f0f1e;
    --light: #f8f9fc;
    --lighter: #ffffff;
    --text: #2c3e50;
    --text-light: #6c757d;
    --text-muted: #95a5a6;
    --border: #e2e8f0;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #3b82f6;
    --info-light: #dbeafe;
    --purple: #8b5cf6;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-md: 0 8px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 15px 35px rgba(0,0,0,0.15);
    --shadow-xl: 0 25px 50px rgba(0,0,0,0.2);
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    --gradient-gold: linear-gradient(135deg, #d4af37 0%, #f4e4a6 50%, #b8941f 100%);
    --gradient-dark: linear-gradient(135deg, #1a3a5c 0%, #0f2744 100%);
    --gradient-hero: linear-gradient(135deg, #1a3a5c 0%, #2c5282 50%, #1a3a5c 100%);
}

/* ============================================
   ریست و پایه
============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Vazirmatn', 'Tahoma', Arial, sans-serif;
    direction: rtl;
    background: var(--light);
    color: var(--text);
    line-height: 1.7;
    font-size: 15px;
    min-height: 100vh;
}

a {
    color: var(--secondary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
}

/* ============================================
   اسکرول‌بار سفارشی
============================================ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
    transition: var(--transition);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ============================================
   صفحه ورود (Login)
============================================ */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--gradient-dark);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    top: -25%;
    right: -25%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(212,175,55,0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(212,175,55,0.1) 0%, transparent 40%);
    animation: bgFloat 25s ease-in-out infinite;
}

.login-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(212,175,55,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212,175,55,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

@keyframes bgFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-30px, -30px) rotate(5deg); }
}

.login-box {
    background: rgba(255,255,255,0.98);
    border-radius: var(--radius-xl);
    padding: 50px 45px;
    width: 100%;
    max-width: 520px;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 10;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(212,175,55,0.2);
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.logo-container img {
    max-width: 260px;
    height: auto;
    margin: 0 auto;
    filter: drop-shadow(0 8px 20px rgba(0,0,0,0.15));
    transition: var(--transition);
}

.logo-container img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 12px 25px rgba(212,175,55,0.3));
}

.login-title {
    text-align: center;
    font-size: 32px;
    font-weight: 800;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.login-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 35px;
    font-size: 14px;
    line-height: 1.8;
}

/* ============================================
   فرم‌ها
============================================ */
.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    background: var(--lighter);
    color: var(--text);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(212,175,55,0.15);
    background: var(--lighter);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

/* ============================================
   دکمه‌ها
============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 28px;
    background: var(--gradient-gold);
    color: var(--secondary-dark);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
    width: 100%;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: right 0.6s;
}

.btn:hover::before {
    right: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--secondary-dark);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--gradient-dark);
    color: white;
    margin-top: 12px;
}

.btn-secondary:hover {
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: white;
}

.btn-danger:hover {
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
}

.btn-success:hover {
    color: white;
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
    width: auto;
    border-radius: var(--radius-sm);
}

.btn-view {
    background: var(--info);
    color: white;
}

.btn-view:hover {
    background: #2563eb;
    color: white;
}

.btn-edit {
    background: var(--warning);
    color: white;
}

.btn-edit:hover {
    background: #d97706;
    color: white;
}

/* ============================================
   داشبورد - نوار بالا
============================================ */
.dashboard-container {
    min-height: 100vh;
    background: var(--light);
}

.top-navbar {
    background: var(--gradient-dark);
    color: white;
    padding: 14px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--primary);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.navbar-brand img {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(212,175,55,0.3));
}

.navbar-brand h1 {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    margin: 0;
    letter-spacing: -0.5px;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    text-align: left;
}

.user-info span {
    display: block;
    font-size: 13px;
}

.user-info .user-name {
    font-weight: 700;
    color: var(--primary);
    font-size: 15px;
}

.user-info .user-role {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    margin-top: 2px;
}

.logout-btn {
    padding: 9px 22px;
    background: rgba(239,68,68,0.15);
    border: 1px solid var(--danger);
    color: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    text-decoration: none;
    font-size: 13px;
}

.logout-btn:hover {
    background: var(--danger);
    transform: translateY(-2px);
    color: white;
}

/* ============================================
   داشبورد - چیدمان اصلی
============================================ */
.main-wrapper {
    display: flex;
    min-height: calc(100vh - 80px);
}

.sidebar {
    width: 280px;
    background: var(--lighter);
    box-shadow: var(--shadow);
    padding: 25px 0;
    position: fixed;
    height: calc(100vh - 80px);
    overflow-y: auto;
    transition: var(--transition);
    z-index: 999;
    top: 80px;
    border-left: 1px solid var(--border);
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 4px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
    border-right: 4px solid transparent;
    font-weight: 600;
    font-size: 14px;
    gap: 10px;
}

.sidebar-menu a:hover {
    background: linear-gradient(90deg, rgba(212,175,55,0.08) 0%, transparent 100%);
    border-right-color: var(--primary);
    color: var(--secondary);
    padding-right: 30px;
}

.sidebar-menu a.active {
    background: linear-gradient(90deg, rgba(212,175,55,0.15) 0%, transparent 100%);
    border-right-color: var(--primary);
    color: var(--secondary);
    font-weight: 700;
}

.sidebar-menu i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.content-area {
    flex: 1;
    margin-right: 280px;
    padding: 30px;
    background: var(--light);
    min-height: calc(100vh - 80px);
}

/* ============================================
   کارت‌های آمار
============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--lighter);
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-top: 4px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(212,175,55,0.03) 0%, transparent 100%);
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-card.success { border-top-color: var(--success); }
.stat-card.warning { border-top-color: var(--warning); }
.stat-card.danger { border-top-color: var(--danger); }
.stat-card.info { border-top-color: var(--info); }

.stat-card h3 {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .stat-number {
    font-size: 32px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 5px;
    letter-spacing: -1px;
}

.stat-card .stat-change {
    font-size: 12px;
    color: var(--success);
    font-weight: 600;
}

/* ============================================
   جدول داده‌ها
============================================ */
.data-table-container {
    background: var(--lighter);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 25px;
}

.table-header {
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(212,175,55,0.05) 0%, transparent 100%);
}

.table-header h2 {
    font-size: 18px;
    color: var(--text);
    margin: 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--light);
}

.data-table th {
    padding: 14px 20px;
    text-align: right;
    font-weight: 700;
    font-size: 13px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
}

.data-table td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--text);
}

.data-table tbody tr {
    transition: var(--transition-fast);
}

.data-table tbody tr:hover {
    background: rgba(212,175,55,0.05);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   کانتینر فرم
============================================ */
.form-container {
    background: var(--lighter);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 25px;
}

.form-container h3 {
    color: var(--secondary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
    font-size: 18px;
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border);
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section h3 {
    color: var(--secondary);
    margin-bottom: 18px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================
   صفحه عمومی
============================================ */
.public-page {
    background: var(--lighter);
    min-height: 100vh;
}

.public-header {
    background: var(--gradient-hero);
    color: white;
    padding: 70px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.public-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(212,175,55,0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(212,175,55,0.15) 0%, transparent 50%);
    animation: bgFloat 20s ease-in-out infinite;
}

.public-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(212,175,55,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212,175,55,0.05) 1px, transparent 1px);
    background-size: 60px 60px;
}

.public-header > * {
    position: relative;
    z-index: 1;
}

.public-header img {
    max-width: 320px;
    margin: 0 auto 25px;
    filter: drop-shadow(0 10px 25px rgba(0,0,0,0.3));
}

.public-header h1 {
    font-size: 38px;
    margin-bottom: 12px;
    font-weight: 800;
    color: white;
    letter-spacing: -0.5px;
}

.public-header p {
    font-size: 17px;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

.public-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 20px;
}

.public-section {
    margin-bottom: 50px;
    padding: 40px;
    background: var(--lighter);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.public-section:hover {
    box-shadow: var(--shadow-md);
}

.public-section h2 {
    color: var(--secondary);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary);
    font-size: 26px;
    font-weight: 800;
    display: inline-block;
}

/* ============================================
   کارت‌های تیم و دفاتر
============================================ */
.team-grid,
.offices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.team-member,
.office-card {
    background: linear-gradient(135deg, var(--light) 0%, var(--lighter) 100%);
    padding: 30px 25px;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
    box-shadow: var(--shadow-sm);
}

.team-member:hover,
.office-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.team-member img,
.office-card img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 18px;
    border: 4px solid var(--primary);
    box-shadow: var(--shadow);
}

.team-member h3,
.office-card h3 {
    color: var(--text);
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 700;
}

.team-member p,
.office-card p {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.6;
}

/* ============================================
   لیست خدمات
============================================ */
.services-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.services-list li {
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(212,175,55,0.08) 0%, rgba(205,133,63,0.08) 100%);
    border-radius: var(--radius);
    border-right: 4px solid var(--primary);
    font-weight: 600;
    transition: var(--transition);
    font-size: 14px;
}

.services-list li:hover {
    transform: translateX(-5px);
    background: linear-gradient(135deg, rgba(212,175,55,0.15) 0%, rgba(205,133,63,0.15) 100%);
    box-shadow: var(--shadow-sm);
}

/* ============================================
   فرم درخواست عمومی
============================================ */
.request-form {
    background: linear-gradient(135deg, var(--light) 0%, var(--lighter) 100%);
    padding: 35px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.upload-area {
    border: 3px dashed var(--primary);
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    text-align: center;
    background: rgba(212,175,55,0.05);
    transition: var(--transition);
    cursor: pointer;
}

.upload-area:hover {
    background: rgba(212,175,55,0.1);
    border-color: var(--secondary);
    transform: scale(1.02);
}

.upload-area i {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 15px;
    display: block;
}

.upload-area h3 {
    color: var(--text);
    margin-bottom: 10px;
    font-size: 18px;
}

.upload-file-row {
    margin-bottom: 10px;
    padding: 10px;
    background: var(--light);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.upload-file-row input[type="file"] {
    width: 100%;
    font-family: inherit;
    font-size: 13px;
}

/* ============================================
   صفحه پرونده
============================================ */
.case-page {
    padding: 0;
}

.case-header {
    background: var(--gradient-gold);
    color: var(--secondary-dark);
    padding: 30px;
    border-radius: var(--radius-lg);
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.case-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 100%);
    pointer-events: none;
}

.case-header > * {
    position: relative;
    z-index: 1;
}

.case-header h1 {
    font-size: 26px;
    margin-bottom: 15px;
    font-weight: 800;
    color: var(--secondary-dark);
}

.case-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.case-meta-item {
    background: rgba(255,255,255,0.3);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    color: var(--secondary-dark);
    border: 1px solid rgba(255,255,255,0.4);
}

/* ============================================
   تب‌های پرونده
============================================ */
.case-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border);
    overflow-x: auto;
    padding-bottom: 0;
    scrollbar-width: thin;
}

.case-tab {
    padding: 12px 22px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-light);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
    white-space: nowrap;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    font-family: inherit;
}

.case-tab:hover {
    color: var(--secondary);
    background: rgba(212,175,55,0.05);
}

.case-tab.active {
    color: var(--secondary);
    border-bottom-color: var(--primary);
    background: rgba(212,175,55,0.08);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   کارت‌های مالی
============================================ */
.financial-card {
    background: var(--lighter);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    border-right: 5px solid var(--success);
    transition: var(--transition);
}

.financial-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.financial-card h3 {
    color: var(--text);
    margin-bottom: 18px;
    font-size: 17px;
    font-weight: 700;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.financial-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.financial-row:last-child {
    border-bottom: none;
}

.financial-label {
    color: var(--text-light);
    font-weight: 600;
    font-size: 14px;
}

.financial-value {
    font-weight: 800;
    color: var(--text);
    font-size: 15px;
}

.financial-value.positive {
    color: var(--success);
}

.financial-value.negative {
    color: var(--danger);
}

/* ============================================
   پنل هوش مصنوعی
============================================ */
.ai-panel {
    background: var(--gradient-dark);
    color: white;
    padding: 35px;
    border-radius: var(--radius-xl);
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.ai-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212,175,55,0.1) 0%, transparent 50%);
    animation: bgFloat 30s ease-in-out infinite;
}

.ai-panel > * {
    position: relative;
    z-index: 1;
}

.ai-panel h3 {
    margin-bottom: 20px;
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
}

.ai-input-area {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.ai-input-area textarea {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: var(--radius);
    resize: none;
    font-family: inherit;
    font-size: 14px;
    background: rgba(255,255,255,0.95);
    color: var(--text);
}

.ai-response {
    background: rgba(255,255,255,0.1);
    padding: 25px;
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
    min-height: 100px;
    border: 1px solid rgba(255,255,255,0.2);
    line-height: 2;
}

/* ============================================
   آیتم‌های مستندات
============================================ */
.documents-list {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.document-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--light);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.document-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
    transform: translateX(-3px);
}

.document-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.document-icon {
    font-size: 32px;
    color: var(--primary);
}

.document-details h4 {
    font-size: 15px;
    margin-bottom: 4px;
    color: var(--text);
}

.document-details span {
    font-size: 12px;
    color: var(--text-light);
}

/* ============================================
   قرارهای ملاقات
============================================ */
.meeting-card {
    background: var(--lighter);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 15px;
    border-right: 4px solid var(--info);
    transition: var(--transition);
}

.meeting-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.meeting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.meeting-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.meeting-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    background: var(--info-light);
    color: var(--info);
}

.meeting-status.completed {
    background: var(--success-light);
    color: var(--success);
}

.meeting-status.cancelled {
    background: var(--danger-light);
    color: var(--danger);
}

.meeting-details {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-light);
}

.meeting-detail {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ============================================
   نظرات و نظریات
============================================ */
.comments-section {
    display: grid;
    gap: 15px;
    margin-top: 20px;
}

.comment-item {
    background: var(--lighter);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border-right: 4px solid var(--primary);
    transition: var(--transition);
}

.comment-item:hover {
    box-shadow: var(--shadow);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.comment-author {
    font-weight: 700;
    color: var(--secondary);
    font-size: 14px;
}

.comment-type {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 700;
    margin-right: 8px;
    background: var(--primary-light);
    color: var(--primary-dark);
}

.comment-type.legal { background: var(--info-light); color: var(--info); }
.comment-type.technical { background: var(--success-light); color: var(--success); }
.comment-type.urban { background: var(--warning-light); color: var(--warning); }

.comment-date {
    font-size: 12px;
    color: var(--text-muted);
}

.comment-content {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text);
}

/* ============================================
   مدیریت دسترسی‌ها
============================================ */
.permission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.permission-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: var(--light);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.permission-item:hover {
    border-color: var(--primary);
    background: rgba(212,175,55,0.05);
}

.permission-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.permission-item label {
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    flex: 1;
}

/* ============================================
   Badge و Alert
============================================ */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary { background: var(--info); color: white; }
.badge-success { background: var(--success); color: white; }
.badge-warning { background: var(--warning); color: white; }
.badge-danger { background: var(--danger); color: white; }
.badge-info { background: var(--info); color: white; }

.alert {
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 14px;
    border-right: 4px solid;
}

.alert-success {
    background: var(--success-light);
    color: #065f46;
    border-color: var(--success);
}

.alert-danger {
    background: var(--danger-light);
    color: #991b1b;
    border-color: var(--danger);
}

.alert-warning {
    background: var(--warning-light);
    color: #92400e;
    border-color: var(--warning);
}

.alert-info {
    background: var(--info-light);
    color: #1e40af;
    border-color: var(--info);
}

/* ============================================
   انیمیشن‌ها و utilities
============================================ */
.fade-in {
    animation: fadeIn 0.5s ease;
}

.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.mt-30 { margin-top: 30px; }
.mb-30 { margin-bottom: 30px; }

/* ============================================
   ریسپانسیو
============================================ */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    .content-area {
        margin-right: 240px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(100%);
        width: 280px;
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .content-area {
        margin-right: 0;
        padding: 20px 15px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .case-meta {
        flex-direction: column;
        gap: 8px;
    }
    .top-navbar {
        padding: 12px 15px;
        flex-wrap: wrap;
    }
    .navbar-brand h1 {
        font-size: 18px;
    }
    .navbar-brand img {
        height: 40px;
    }
    .public-header {
        padding: 50px 15px;
    }
    .public-header h1 {
        font-size: 26px;
    }
    .public-header p {
        font-size: 14px;
    }
    .public-section {
        padding: 25px 20px;
    }
    .public-section h2 {
        font-size: 20px;
    }
    .team-grid,
    .offices-grid {
        grid-template-columns: 1fr;
    }
    .case-tabs {
        gap: 4px;
    }
    .case-tab {
        padding: 10px 15px;
        font-size: 13px;
    }
    .login-box {
        padding: 35px 25px;
    }
    .login-title {
        font-size: 26px;
    }
    .ai-panel {
        padding: 25px 20px;
    }
    .form-container {
        padding: 20px;
    }
    .data-table {
        font-size: 13px;
    }
    .data-table th,
    .data-table td {
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .user-info {
        display: none;
    }
    .stat-card .stat-number {
        font-size: 26px;
    }
    .public-header h1 {
        font-size: 22px;
    }
}

/* ============================================
   چاپ
============================================ */
@media print {
    .sidebar,
    .top-navbar,
    .btn,
    .case-tabs {
        display: none !important;
    }
    .content-area {
        margin: 0;
        padding: 0;
    }
}