/* ========================================
   TECHLYA - سیستم مانیتورینگ طلافروشی
   استایل مدرن، لوکس و کاربرپسند - لایت مد
   ======================================== */

@font-face {
    font-family: 'Vazir';
    src: url('../fonts/Vazir-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Vazir';
    src: url('../fonts/Vazir-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}

:root {
    --gold-primary: #d4af37;
    --gold-dark: #b8960c;
    --gold-light: #f5e6a3;
    --gold-glow: rgba(212, 175, 55, 0.3);
    --success: #2ecc71;
    --danger: #e74c3c;
    --warning: #f39c12;
    --info: #3498db;
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* لایت مد ثابت */
    --bg-dark: #f5f0e8;
    --bg-card: #ffffff;
    --bg-sidebar: #faf6ed;
    --bg-input: #f0ece4;
    --text-primary: #1a1a2e;
    --text-secondary: #5a5a6e;
}

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

body {
    font-family: 'Vazir', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f0e8 0%, #e8dcc8 100%);
    color: var(--text-primary);
    min-height: 100vh;
    direction: rtl;
}

/* ========== اسکرول بار سفارشی ========== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-input);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--gold-primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-dark);
}

/* ========== کانتینر اصلی ========== */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ========== سایدبار ========== */
.sidebar {
    width: 280px;
    background: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(212, 175, 55, 0.15);
    display: flex;
    flex-direction: column;
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar.collapsed .sidebar-menu li span,
.sidebar.collapsed .user-info-sidebar div span,
.sidebar.collapsed .sidebar-header .logo-text,
.sidebar.collapsed .sidebar-header .logo-badge {
    display: none;
}

.sidebar.collapsed .sidebar-menu li {
    justify-content: center;
    padding: 14px 0;
}

/* حالت موبایل */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(100%);
        width: 280px;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-right: 0 !important;
    }
}

.sidebar-header {
    padding: 25px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1.3rem;
    font-weight: bold;
}

.logo-icon {
    font-size: 2rem;
}

.logo-text {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-badge {
    font-size: 0.7rem;
    background: rgba(212, 175, 55, 0.2);
    padding: 2px 6px;
    border-radius: 20px;
    color: var(--gold-primary);
}

.sidebar-menu {
    list-style: none;
    padding: 20px 12px;
    flex: 1;
}

.sidebar-menu li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    margin: 4px 0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.sidebar-menu li:hover {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold-primary);
    transform: translateX(-4px);
}

.sidebar-menu li.active {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(212, 175, 55, 0.1));
    color: var(--gold-primary);
    border-right: 3px solid var(--gold-primary);
}

.sidebar-menu li i {
    width: 24px;
    text-align: center;
    font-size: 1.2rem;
}

.user-info-sidebar {
    padding: 20px;
    border-top: 1px solid rgba(212, 175, 55, 0.15);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.user-info-sidebar div {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logout-btn {
    background: rgba(231, 76, 60, 0.15);
    color: var(--danger);
    padding: 10px;
    border-radius: 12px;
    text-align: center;
    margin-top: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: var(--danger);
    color: white;
}

/* ========== محتوای اصلی ========== */
.main-content {
    flex: 1;
    margin-right: 280px;
    padding: 20px;
    transition: all 0.3s ease;
}

.main-content.expanded {
    margin-right: 80px;
}

/* ========== هدر بالایی ========== */
.top-bar {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    border: 1px solid rgba(212, 175, 55, 0.1);
    flex-wrap: wrap;
    gap: 12px;
}

.top-bar-left {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-icon {
    background: rgba(212, 175, 55, 0.1);
    padding: 10px 18px;
    border-radius: 12px;
    color: var(--gold-primary);
    transition: all 0.3s ease;
    font-weight: 500;
    cursor: pointer;
    border: none;
}

.btn-icon:hover {
    background: var(--gold-primary);
    color: var(--bg-dark);
}

.panic-btn {
    background: linear-gradient(135deg, var(--danger), #c0392b);
    color: white;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: bold;
    animation: pulse-red 2s infinite;
    border: none;
    cursor: pointer;
}

@keyframes pulse-red {
    0%, 100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(231, 76, 60, 0); }
}

.datetime {
    font-family: monospace;
    background: rgba(212, 175, 55, 0.08);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    color: var(--gold-primary);
}

/* ========== کارت‌ها ========== */
.card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid rgba(212, 175, 55, 0.08);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: rgba(212, 175, 55, 0.2);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

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

/* ========== استاتوس بار امنیتی ========== */
.security-status-bar {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 16px 24px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.security-status-bar.security-green { 
    border-right: 4px solid var(--success); 
    background: rgba(46, 204, 113, 0.05); 
}

.security-status-bar.security-yellow { 
    border-right: 4px solid var(--warning); 
    background: rgba(243, 156, 18, 0.05); 
}

.security-status-bar.security-red { 
    border-right: 4px solid var(--danger); 
    background: rgba(231, 76, 60, 0.08); 
    animation: pulse-security 1s infinite; 
}

@keyframes pulse-security {
    0%, 100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.2); }
    50% { box-shadow: 0 0 0 8px rgba(231, 76, 60, 0); }
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
}

.security-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.security-dot.green { 
    background: var(--success); 
    box-shadow: 0 0 8px var(--success); 
}

.security-dot.yellow { 
    background: var(--warning); 
    box-shadow: 0 0 8px var(--warning); 
}

.security-dot.red { 
    background: var(--danger); 
    box-shadow: 0 0 8px var(--danger); 
    animation: blink 1s infinite; 
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.security-stats {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ========== گرید آمار ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(212, 175, 55, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold-primary);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--gold-primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* ========== فرم‌ها ========== */
input, select, textarea {
    background: var(--bg-input);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    outline: none;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 2px var(--gold-glow);
}

input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

/* ========== دکمه‌ها ========== */
.btn {
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: var(--bg-dark);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
}

.btn-danger {
    background: rgba(231, 76, 60, 0.15);
    color: var(--danger);
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
}

.btn-success {
    background: rgba(46, 204, 113, 0.15);
    color: var(--success);
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.btn-success:hover {
    background: var(--success);
    color: white;
}

.btn-warning {
    background: rgba(243, 156, 18, 0.15);
    color: var(--warning);
    border: 1px solid rgba(243, 156, 18, 0.3);
}

.btn-warning:hover {
    background: var(--warning);
    color: var(--bg-dark);
}

.btn-outline {
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--gold-primary);
}

.btn-outline:hover {
    background: rgba(212, 175, 55, 0.1);
}

/* ========== نوار قیمت طلا ========== */
.gold-ticker {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.05));
    border-radius: var(--border-radius);
    padding: 16px 24px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.gold-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.05);
    padding: 6px 14px;
    border-radius: 30px;
}

.gold-item span:first-child {
    color: var(--text-secondary);
}

.gold-item span:last-child {
    color: var(--gold-primary);
    font-weight: bold;
}

/* ========== گرید دوربین‌ها ========== */
.cams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.cam-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.1);
    transition: all 0.3s ease;
}

.cam-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold-primary);
}

.cam-preview {
    height: 200px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
}

.live-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--danger);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: bold;
    animation: blink 1s infinite;
}

.rec-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.7rem;
}

.cam-info {
    padding: 16px;
}

.cam-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.7rem;
    margin-top: 8px;
}

.badge-online {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.badge-offline {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.ip-badge {
    font-family: monospace;
    background: rgba(0, 0, 0, 0.05);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
}

.cam-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

/* ========== مودال ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 30px;
    max-width: 500px;
    width: 90%;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

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

.modal-header h3 {
    color: var(--gold-primary);
}

.modal-close {
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.modal-body {
    margin-bottom: 20px;
}

.modal-body input, .modal-body select {
    width: 100%;
    margin-bottom: 12px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ========== نوتیفیکیشن ========== */
.notification-panel {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 360px;
    z-index: 1100;
    pointer-events: none;
}

.notification {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 10px;
    border-right: 4px solid var(--gold-primary);
    pointer-events: auto;
    cursor: pointer;
    animation: slideIn 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.notification.critical {
    border-right-color: var(--danger);
    background: rgba(231, 76, 60, 0.15);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========== رویدادها و وقایع ========== */
.event-item {
    padding: 12px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    transition: all 0.3s ease;
}

.event-item:hover {
    background: rgba(212, 175, 55, 0.05);
}

.event-critical {
    border-right: 4px solid var(--danger);
    background: rgba(231, 76, 60, 0.05);
}

.event-time {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-family: monospace;
}

.event-title {
    font-weight: bold;
}

.event-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

/* ========== کانتر تردد ========== */
.visitor-counter {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.counter-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.counter-item {
    text-align: center;
    padding: 16px;
    background: rgba(212, 175, 55, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.counter-item:hover {
    background: rgba(212, 175, 55, 0.1);
    transform: scale(1.02);
}

.counter-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--gold-primary);
}

/* ========== تنظیمات ========== */
.settings-section {
    margin-bottom: 30px;
}

.settings-section h4 {
    color: var(--gold-primary);
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.settings-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 15px;
}

.settings-row label {
    min-width: 120px;
    color: var(--text-secondary);
}

.settings-row input, .settings-row select {
    flex: 1;
    min-width: 200px;
}

.time-lock-status {
    margin-top: 15px;
    padding: 12px;
    background: rgba(212, 175, 55, 0.08);
    border-radius: 12px;
    font-size: 0.85rem;
}

.info-card {
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid rgba(52, 152, 219, 0.2);
    padding: 16px;
    border-radius: 12px;
    margin-top: 20px;
}

.info-card h5 {
    color: var(--info);
    margin-bottom: 10px;
}

.backup-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 15px;
}

/* ========== جستجو ========== */
.search-box {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-box input {
    flex: 1;
    min-width: 200px;
}

/* ========== AI دکمه‌ها ========== */
.ai-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

/* ========== صفحات گزارشات ========== */
.report-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.date-range {
    display: flex;
    gap: 10px;
    align-items: center;
}

.report-type-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.report-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.report-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--gold-primary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.stats-grid-report {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: rgba(212, 175, 55, 0.05);
    border-radius: 12px;
}

.stat-item .value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--gold-primary);
}

.stat-item .label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

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

.event-table th, .event-table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.event-table th {
    color: var(--gold-primary);
    font-weight: bold;
}

.export-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.summary-box {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.05));
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

/* ========== دکمه منوی دسکتاپ ========== */
.menu-desktop-btn {
    background: rgba(212, 175, 55, 0.1);
    padding: 10px 18px;
    border-radius: 12px;
    color: var(--gold-primary);
    transition: all 0.3s ease;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.menu-desktop-btn:hover {
    background: var(--gold-primary);
    color: var(--bg-dark);
}

@media (max-width: 992px) {
    .menu-desktop-btn {
        display: none;
    }
}

/* ========== دکمه منوی موبایل ========== */
.mobile-menu-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 200;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    border: none;
    border-radius: 12px;
    padding: 10px 18px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--bg-dark);
    font-weight: bold;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    transform: scale(1.02);
}

@media (max-width: 992px) {
    .mobile-menu-btn {
        display: block;
    }
}

/* ========== صفحات شمارش هوشمند ========== */
.counter-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.counter-stat-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(212, 175, 55, 0.1);
    transition: all 0.3s ease;
}

.counter-stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold-primary);
}

.counter-stat-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.counter-stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--gold-primary);
}

.counter-stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

.trend-up {
    color: #2ecc71;
}

.trend-down {
    color: #e74c3c;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.item-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 20px;
    border: 1px solid rgba(212, 175, 55, 0.1);
    transition: all 0.3s ease;
}

.item-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold-primary);
}

.item-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--gold-primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.item-count {
    font-size: 2rem;
    font-weight: bold;
    margin: 10px 0;
}

.item-change {
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 20px;
    display: inline-block;
}

.change-positive {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.change-negative {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.change-neutral {
    background: rgba(212, 175, 55, 0.2);
    color: var(--gold-primary);
}

.item-details {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.scan-btn {
    margin-top: 20px;
    width: 100%;
    padding: 14px;
}

.last-update {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 15px;
}

.camera-preview {
    background: linear-gradient(135deg, #e8dcc8, #d4c4a8);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.camera-preview h4 {
    color: var(--gold-primary);
    margin-bottom: 15px;
}

.camera-placeholder {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 30px;
    margin-top: 10px;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold-primary);
}

/* ========== ریسپانسیو ========== */
@media (max-width: 992px) {
    .main-content {
        margin-right: 0 !important;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cams-grid {
        grid-template-columns: 1fr;
    }
    
    .counter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .counter-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .items-grid {
        grid-template-columns: 1fr;
    }
    
    .top-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .top-bar-left {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .datetime {
        text-align: center;
    }
    
    .gold-ticker {
        flex-direction: column;
        text-align: center;
    }
    
    .security-status-bar {
        flex-direction: column;
        text-align: center;
    }
    
    .notification-panel {
        width: calc(100% - 40px);
        left: 20px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .counter-grid {
        grid-template-columns: 1fr;
    }
    
    .counter-stats {
        grid-template-columns: 1fr;
    }
    
    .card {
        padding: 16px;
    }
}