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

body {
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    background: #f0f4f9;
    color: #0a1628;
    direction: rtl;
    min-height: 100vh;
}

/* ===== Login Screen ===== */
#loginScreen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a1628 0%, #1a2a4a 100%);
    padding: 20px;
}

.login-box {
    background: #fff;
    padding: 40px 36px;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 380px;
    text-align: center;
}

.login-box h1 {
    font-size: 22px;
    color: #0a1628;
    margin-bottom: 4px;
}

.login-box p {
    color: #7a8a9a;
    font-size: 13px;
    margin-bottom: 24px;
}

.login-box .form-group {
    text-align: right;
    margin-bottom: 16px;
}

.login-box label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #5a6c7d;
    margin-bottom: 6px;
}

.login-box input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e8edf5;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s;
}

.login-box input:focus {
    border-color: #1a2a4a;
    outline: none;
    box-shadow: 0 0 0 4px rgba(26, 42, 74, 0.08);
}

.login-box button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: #1a2a4a;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.3s;
}

.login-box button:hover {
    background: #0a1628;
}

.login-error {
    display: none;
    background: #fdecea;
    color: #d32f2f;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 16px;
}

/* ===== App Shell ===== */
#appScreen {
    display: none;
    min-height: 100vh;
}

.admin-header {
    background: #0a1628;
    color: #fff;
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-header h1 {
    font-size: 18px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-header .user-info {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    flex-wrap: wrap;
}

.admin-lang-switch { display: flex; gap: 4px; background: rgba(255,255,255,0.06); border-radius: 10px; padding: 3px; }
.admin-lang-btn { background: transparent; color: #8aa4c8; border: none; padding: 5px 12px; border-radius: 7px; font-size: 11px; font-weight: 700; letter-spacing: 0.5px; cursor: pointer; transition: all 0.2s; }
.admin-lang-btn:hover { color: #fff; }
.admin-lang-btn.active { background: #f5b342; color: #0a1628; }

.btn-home-link { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.08); color: #cdd9ea; border: 1px solid rgba(255,255,255,0.1); padding: 7px 14px; border-radius: 10px; font-size: 12px; font-weight: 600; text-decoration: none; transition: all 0.2s; }
.btn-home-link:hover { background: rgba(255,255,255,0.14); color: #fff; }

.security-indicator { display: inline-flex; align-items: center; gap: 6px; border: none; border-radius: 20px; padding: 6px 14px; font-size: 11px; font-weight: 700; cursor: pointer; transition: all 0.25s; }
.security-indicator.safe { background: rgba(76,175,80,0.15); color: #4caf50; border: 1px solid rgba(76,175,80,0.3); }
.security-indicator.safe:hover { background: rgba(76,175,80,0.25); }
.security-indicator.alert { background: rgba(220,53,69,0.18); color: #ff6b7a; border: 1px solid rgba(220,53,69,0.4); animation: securityPulse 1.5s infinite; }
.security-indicator.alert:hover { background: rgba(220,53,69,0.28); }
@keyframes securityPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220,53,69,0.4); }
    50% { box-shadow: 0 0 0 6px rgba(220,53,69,0); }
}

.btn-logout {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.2);
}

#onlineStatus {
    font-size: 11px;
    color: #4caf50;
}

.admin-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 24px;
}

/* ===== Tab Styles ===== */
.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 8px 18px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    background: #eef2f7;
    color: #5a6c7d;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.tab-btn:hover {
    background: #e0e6ee;
}

.tab-btn.active {
    background: #1a2a4a;
    color: #fff;
    box-shadow: 0 4px 15px rgba(26, 42, 74, 0.3);
}

.tab-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Controls ===== */
.admin-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.btn-add, .btn-refresh, .btn-save, .btn-upload {
    padding: 10px 18px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.btn-add, .btn-save {
    background: #1a2a4a;
    color: #fff;
}

.btn-add:hover, .btn-save:hover {
    background: #0a1628;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(26, 42, 74, 0.3);
}

.btn-refresh, .btn-upload {
    background: #eef2f7;
    color: #1a2a4a;
}

.btn-refresh:hover, .btn-upload:hover {
    background: #e0e6ee;
}

.btn-remove-image {
    padding: 6px 12px;
    background: #fce4ec;
    color: #c62828;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.btn-remove-image:hover {
    background: #f8bbd0;
}

.truck-gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.truck-gallery-item {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e8edf5;
    background: #f0f4f9;
}

.truck-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.truck-gallery-item .cover-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26, 42, 74, 0.85);
    color: #fff;
    font-size: 9px;
    text-align: center;
    padding: 2px 0;
    letter-spacing: .5px;
}

.truck-gallery-item .remove-item-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(198, 40, 40, 0.9);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.truck-gallery-item .remove-item-btn:hover {
    background: #c62828;
}

.table-image-wrap {
    position: relative;
    display: inline-block;
}

.table-image-wrap .gallery-count-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: #1a2a4a;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 10px;
    line-height: 1.4;
}

.btn-edit, .btn-delete, .btn-permissions {
    border: none;
    background: #eef2f7;
    color: #1a2a4a;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    margin: 0 2px;
    transition: all 0.3s;
}

.btn-edit:hover { background: #d6e4f7; }
.btn-delete { color: #d32f2f; }
.btn-delete:hover { background: #fdecea; }
.btn-permissions { color: #8a6d1a; }
.btn-permissions:hover { background: #fff4d9; }

.search-box {
    display: flex;
    border: 2px solid #e8edf5;
    border-radius: 10px;
    overflow: hidden;
    margin-inline-start: auto;
    transition: border-color 0.3s;
}

.search-box:focus-within {
    border-color: #1a2a4a;
}

.search-box input {
    padding: 9px 14px;
    border: none;
    font-size: 13px;
    width: 220px;
    outline: none;
}

.search-box button {
    padding: 9px 14px;
    border: none;
    background: #1a2a4a;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s;
}

.search-box button:hover {
    background: #0a1628;
}

/* ===== Table ===== */
.table-container {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

thead {
    background: #f8f9fc;
}

th, td {
    padding: 12px 14px;
    text-align: right;
    white-space: nowrap;
}

th {
    color: #5a6c7d;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

tbody tr {
    border-top: 1px solid #f0f4f9;
}

tbody tr:hover {
    background: #fafbfd;
}

.status-badge {
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.status-available {
    background: #e5f7ee;
    color: #1a9e5c;
}

.status-sold {
    background: #fdecea;
    color: #d32f2f;
}

/* ===== Modal ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 40, 0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: #fff;
    border-radius: 18px;
    padding: 28px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { transform: scale(0.95) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-box h3 {
    margin-top: 0;
    margin-bottom: 18px;
    color: #0a1628;
}

.modal-box .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: #5a6c7d;
    display: block;
    margin-bottom: 4px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e8edf5;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #1a2a4a;
    outline: none;
    box-shadow: 0 0 0 4px rgba(26, 42, 74, 0.08);
}

/* ===== دوگمەی نیشاندان/شاردنەوەی وشەی نهێنی (ئایکۆنی چاو) ===== */
.password-toggle-wrap { position: relative; }
.password-toggle-wrap input[type="password"],
.password-toggle-wrap input[type="text"] { padding-left: 38px !important; }
/* تێبینی گرنگ: ئەم دوگمەیە زۆرجار لەناو ".login-box" و شوێنی تری کە
   ڕوونووسەیەکی گشتی وەک ".login-box button" یان هاوشێوەی هەیە بەکاردێت.
   ئەو ڕوونووسە گشتییانە (کلاس+ئێلیمێنت) لە بەهێزیدا (CSS specificity)
   لە ".password-toggle-btn" (تەنها کلاس) بەهێزترن، بۆیە بەبێ !important
   دەتوانن width:100% و پاشبنەمای تۆخی دوگمەی سەرەکی بسڕنەوە بەسەر ئەم
   دوگمە بچووکەدا و بیکەن بە خانەیەکی گەورەی تۆخ کە دەکەوێتە سەر خانەی
   نووسینی وشەی نهێنی و ڕێگری لە بینین/نووسینی دەکات. بۆیە لێرەدا
   !important بەکارهاتووە بۆ ئەوەی ئەم دوگمە بچووکە هەمیشە بە قەبارە و
   شێوازی خۆی بمێنێتەوە، بێگومان لە هەر شوێنێکی تری پڕۆژەکەدا بەکاربهێنرێت */
.password-toggle-btn {
    position: absolute !important;
    left: 6px !important;
    right: auto !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) scale(1) !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    color: #9aa7b8 !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    transition: color 0.2s, background 0.2s, transform 0.15s ease;
    z-index: 2;
}
.password-toggle-btn:hover { color: #1a2a4a !important; background: #f0f4f9 !important; transform: translateY(-50%) scale(1.12) !important; }
.password-toggle-btn:active { transform: translateY(-50%) scale(0.92) !important; }
/* ئایکۆنی نیشاندانی وشەی نهێنی ی سروشتی وێبگەڕی Edge/IE (::-ms-reveal) و
   خانەی خاوێنکردنەوەی سروشتی (::-ms-clear) دەشاردرێتەوە - ئەگینا دەکەونە
   سەر ناوچەی دوگمەی چاوی خۆمان و ڕێگری لە کرتەکردن/دەستکاریکردنی خانەکە
   دەکەن، بەتایبەت لە شێوازی RTL دا */
.password-toggle-wrap input[type="password"]::-ms-reveal,
.password-toggle-wrap input[type="password"]::-ms-clear,
.password-toggle-wrap input[type="text"]::-ms-reveal,
.password-toggle-wrap input[type="text"]::-ms-clear {
    display: none;
    width: 0;
    height: 0;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-cancel {
    padding: 10px 18px;
    border: none;
    border-radius: 10px;
    background: #eef2f7;
    color: #5a6c7d;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-cancel:hover {
    background: #e0e6ee;
}

#truckImagePreview img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #e8edf5;
}

/* ===== Settings Form ===== */
.settings-form .form-group {
    margin-bottom: 14px;
}

.settings-form .form-group label {
    font-size: 12px;
    font-weight: 600;
    color: #5a6c7d;
    display: block;
    margin-bottom: 4px;
}

.settings-form .form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e8edf5;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s;
}

.settings-form .form-group input:focus {
    border-color: #1a2a4a;
    outline: none;
    box-shadow: 0 0 0 4px rgba(26, 42, 74, 0.08);
}

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

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.loading-shimmer {
    background: linear-gradient(90deg, #f0f4f9 25%, #e8edf5 50%, #f0f4f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 12px 16px;
    }
    .admin-header .user-info {
        justify-content: center;
    }
    .admin-main { padding: 12px; }
    .modal-box .form-row { grid-template-columns: 1fr; }
    .search-box { margin-inline-start: 0; width: 100%; }
    .search-box input { width: 100%; }
    .admin-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 6px;
        margin-bottom: 14px;
        scrollbar-width: thin;
    }
    .admin-tabs::-webkit-scrollbar { height: 4px; }
    .admin-tabs::-webkit-scrollbar-thumb { background: #d5dce5; border-radius: 4px; }
    .tab-btn { font-size: 11px; padding: 7px 14px; white-space: nowrap; }
    .admin-controls { flex-direction: column; align-items: stretch; }
    .admin-controls .btn-add, 
    .admin-controls .btn-refresh { justify-content: center; }
    table { font-size: 12px; }
    th, td { padding: 8px 6px; }
    .two-col-grid { grid-template-columns: 1fr !important; }
    .modal-box { width: 94vw; max-width: 94vw; }
}

@media (max-width: 480px) {
    .login-box { padding: 24px 18px; }
    .modal-box { padding: 18px; }
    .modal-box .form-row { grid-template-columns: 1fr; }
}
/* ===== Profile (پرۆفایل) ===== */
.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #eef2f7;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #e0e6ee;
    display: inline-block;
    vertical-align: middle;
}
.avatar-circle-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1a2a4a;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    vertical-align: middle;
}
.creator-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 8px 4px 4px;
    border-radius: 30px;
    transition: background 0.2s;
    border: none;
    background: transparent;
    font-family: inherit;
}
.creator-chip:hover { background: #eef2f7; }
.creator-chip span { font-size: 12.5px; color: #1a2a4a; font-weight: 600; }

.btn-my-profile {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 2px 8px 2px 2px;
    border-radius: 30px;
    transition: background 0.2s;
}
.btn-my-profile:hover { background: rgba(255,255,255,0.08); }

.profile-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
}
.profile-header .avatar-circle,
.profile-header .avatar-circle-placeholder {
    width: 76px;
    height: 76px;
    font-size: 26px;
}
.profile-header-info h3 { margin: 0 0 4px; }
.profile-header-info p { margin: 0; color: #7a8a9a; font-size: 13px; }

.profile-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 10px;
}
.profile-post-card {
    border: 1px solid #e8edf5;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}
.profile-post-card img {
    width: 100%;
    height: 100px;
    object-fit: contain;
    background: #f0f4f9;
    display: block;
}
.profile-post-card .profile-post-info { padding: 8px 10px; }
.profile-post-card .profile-post-info strong { font-size: 12.5px; display: block; }
.profile-post-card .profile-post-info span { font-size: 11px; color: #7a8a9a; }

.avatar-upload-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}
.avatar-upload-wrap .avatar-circle,
.avatar-upload-wrap .avatar-circle-placeholder {
    width: 64px;
    height: 64px;
    font-size: 22px;
}

/* ===== WhatsApp Settings ===== */
.wa-placeholder-chip {
    background: #e8f9f0;
    color: #1a7d4a;
    border: 1px solid #c8ecd8;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-family: 'Courier New', monospace;
    cursor: default;
}

.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
    direction: ltr; /* دڵنیابوونەوە لەوەی جووڵەی دوگمەکە پەیوەست نابێت بە RTL ی پەڕەکە */
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #d5dce5;
    transition: 0.3s;
    border-radius: 30px;
}
.switch-slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.switch input:checked + .switch-slider { background-color: #25d366; }
.switch input:checked + .switch-slider::before { transform: translateX(20px); }

/* ========== Dashboard ========== */
.dash-welcome { margin-bottom: 22px; }
.dash-welcome h2 { font-size: 22px; font-weight: 800; color: #0a1628; margin: 0 0 4px; }
.dash-welcome p { font-size: 13.5px; color: #7a8aa0; margin: 0; }

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 18px;
}
.dash-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border: 1px solid #e8edf3;
    border-radius: 16px;
    padding: 20px 18px;
    box-shadow: 0 2px 6px rgba(10,22,40,0.04);
    opacity: 0;
    transform: translateY(14px);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.dash-cards-in .dash-card { animation: dashCardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.dash-cards-in .dash-card:nth-child(1) { animation-delay: 0.02s; }
.dash-cards-in .dash-card:nth-child(2) { animation-delay: 0.08s; }
.dash-cards-in .dash-card:nth-child(3) { animation-delay: 0.14s; }
.dash-cards-in .dash-card:nth-child(4) { animation-delay: 0.20s; }
.dash-cards-in .dash-card:nth-child(5) { animation-delay: 0.26s; }
.dash-cards-in .dash-card:nth-child(6) { animation-delay: 0.32s; }
@keyframes dashCardIn {
    from { opacity: 0; transform: translateY(14px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.dash-card:hover { transform: translateY(-4px); box-shadow: 0 10px 26px rgba(10,22,40,0.10); }

.dash-card-icon {
    flex-shrink: 0;
    width: 48px; height: 48px;
    border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    font-size: 19px; color: #fff;
    background: linear-gradient(135deg, #1a2a4a, #2c4270);
    transition: transform 0.3s ease;
}
.dash-card:hover .dash-card-icon { transform: scale(1.08) rotate(-4deg); }
.dash-card-total .dash-card-icon { background: linear-gradient(135deg, #1a2a4a, #2c4270); }
.dash-card-available .dash-card-icon { background: linear-gradient(135deg, #1a9e6b, #2ecc8f); }
.dash-card-sold .dash-card-icon { background: linear-gradient(135deg, #e0932b, #f5b342); }
.dash-card-price .dash-card-icon { background: linear-gradient(135deg, #1a73c8, #4ea8f0); }
.dash-card-brands .dash-card-icon { background: linear-gradient(135deg, #9b3fc9, #c46be0); }
.dash-card-users .dash-card-icon { background: linear-gradient(135deg, #c9433f, #e07a6b); }

.dash-card-value { font-size: 24px; font-weight: 800; color: #0a1628; line-height: 1.2; letter-spacing: -0.3px; }
.dash-card-label { font-size: 12px; color: #8a9ab0; font-weight: 600; margin-top: 2px; }

@media (max-width: 640px) {
    .dashboard-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .dash-card { padding: 15px 12px; gap: 10px; }
    .dash-card-icon { width: 38px; height: 38px; font-size: 15px; border-radius: 10px; }
    .dash-card-value { font-size: 18px; }
    .dash-card-label { font-size: 10.5px; }
}

/* ========================================================================
   ڕاپۆرتی داشبۆرد (مانگانە/ساڵانە) - تەنها ئەدمینی ڕەیسی
   ======================================================================== */
.dash-card-added .dash-card-icon { background: linear-gradient(135deg, #1a73c8, #38b6ff); }

.reports-section {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px dashed #d8e1ee;
    animation: fadeInUp 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.reports-heading {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-bottom: 16px;
}
.reports-heading i { color: #1a2a4a; font-size: 18px; }
.reports-heading h3 { margin: 0; font-size: 17px; font-weight: 800; color: #0a1628; }
.reports-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, #e0932b, #f5b342);
    color: #fff; font-size: 11px; font-weight: 700;
    padding: 4px 12px; border-radius: 999px;
    box-shadow: 0 3px 10px rgba(224,147,43,0.35);
}
.btn-export-pdf {
    margin-inline-start: auto;
    display: inline-flex; align-items: center; gap: 8px;
    background: linear-gradient(135deg, #c9433f, #e0645f);
    color: #fff; border: none; cursor: pointer;
    font-size: 12.5px; font-weight: 700;
    padding: 9px 16px; border-radius: 10px;
    box-shadow: 0 4px 12px rgba(201,67,63,0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-export-pdf:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(201,67,63,0.4); }
.btn-export-pdf:active { transform: translateY(0); }

.reports-grid { margin-bottom: 22px; }

.reports-charts {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 18px;
}
@media (max-width: 900px) {
    .reports-charts { grid-template-columns: 1fr; }
}

.report-chart-box {
    background: #fff;
    border: 1px solid #eaeff6;
    border-radius: 16px;
    padding: 18px 16px;
    box-shadow: 0 4px 14px rgba(10,22,40,0.05);
}
.report-chart-title {
    font-size: 13.5px; font-weight: 700; color: #1a2a4a;
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 4px;
}
.report-chart-legend {
    display: flex; gap: 16px; font-size: 11.5px; color: #8a9ab0; font-weight: 600;
    margin-bottom: 14px;
}
.report-chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot {
    width: 9px; height: 9px; border-radius: 3px; display: inline-block;
}
.dot-added { background: linear-gradient(135deg, #1a73c8, #38b6ff); }
.dot-sold { background: linear-gradient(135deg, #e0932b, #f5b342); }

.report-bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 150px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.report-bar-group {
    display: flex; flex-direction: column; align-items: center;
    gap: 6px; min-width: 34px; flex: 1;
}
.report-bar-pair {
    display: flex; align-items: flex-end; gap: 3px;
    height: 118px;
}
.report-bar {
    width: 10px;
    border-radius: 5px 5px 2px 2px;
    height: 0;
    transition: height 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
}
.report-bar-added { background: linear-gradient(180deg, #38b6ff, #1a73c8); }
.report-bar-sold { background: linear-gradient(180deg, #f5b342, #e0932b); }
.report-bar-single { width: 26px; background: linear-gradient(180deg, #c46be0, #9b3fc9); }
.report-bar-label {
    font-size: 10px; color: #8a9ab0; font-weight: 600; white-space: nowrap;
}
.report-bar-count {
    font-size: 10px; color: #1a2a4a; font-weight: 700;
    position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
    white-space: nowrap;
}
.report-bars-single .report-bar-group { min-width: 44px; }
.report-bars-empty {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%; color: #b5c0d0; font-size: 12.5px; font-weight: 600;
}

/* ========================================================================
   دەرهێنانی ڕاپۆرت وەک PDF (بە شێوازی سیستەمی ژمێریاری) - بەکاردێت لەگەڵ
   window.print() ی وێبگەڕ (کلیک "Save as PDF"). ناوەڕۆکی ئەم بەشە بە
   admin.js:exportReportsPDF() پڕدەکرێتەوە پێش چاپکردن.
   ======================================================================== */
.report-print-area { display: none; }

@media print {
    /* هەموو ئەپەکە بشارەوە، تەنها بەشی ڕاپۆرت دەربکەوێت */
    body * { visibility: hidden; }
    #reportPrintArea, #reportPrintArea * { visibility: visible; }
    #reportPrintArea {
        display: block !important;
        position: absolute; inset: 0; width: 100%;
        background: #fff; color: #0a1628;
        font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
        padding: 0;
    }
    @page { margin: 14mm 12mm; }
}

.pr-doc { max-width: 900px; margin: 0 auto; }
.pr-header {
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 3px solid #1a2a4a; padding-bottom: 14px; margin-bottom: 18px;
}
.pr-header-brand { display: flex; align-items: center; gap: 12px; }
.pr-header-brand img { height: 52px; width: auto; border-radius: 8px; }
.pr-header-brand-text h1 { margin: 0; font-size: 19px; color: #1a2a4a; }
.pr-header-brand-text p { margin: 2px 0 0; font-size: 11px; color: #5a6a80; }
.pr-header-meta { text-align: end; font-size: 11px; color: #5a6a80; line-height: 1.7; }
.pr-title-bar {
    background: #1a2a4a; color: #fff; padding: 10px 16px; border-radius: 6px;
    font-size: 15px; font-weight: 800; margin-bottom: 18px; text-align: center;
    letter-spacing: 0.3px;
}
.pr-kpi-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 22px;
}
.pr-kpi-box {
    border: 1px solid #d8e1ee; border-radius: 8px; padding: 10px 12px; text-align: center;
}
.pr-kpi-box .pr-kpi-val { font-size: 18px; font-weight: 800; color: #1a2a4a; }
.pr-kpi-box .pr-kpi-lbl { font-size: 10.5px; color: #6a7a90; margin-top: 3px; }
.pr-section-title {
    font-size: 13px; font-weight: 800; color: #1a2a4a;
    border-bottom: 2px solid #1a2a4a; padding-bottom: 5px; margin: 20px 0 10px;
}
.pr-table { width: 100%; border-collapse: collapse; font-size: 11.5px; margin-bottom: 8px; }
.pr-table th {
    background: #eef2f8; color: #1a2a4a; font-weight: 700;
    border: 1px solid #d8e1ee; padding: 7px 8px; text-align: center;
}
.pr-table td { border: 1px solid #e4e9f1; padding: 6px 8px; text-align: center; color: #2a3a50; }
.pr-table tr:nth-child(even) td { background: #f9fbfd; }
.pr-footer {
    margin-top: 26px; padding-top: 10px; border-top: 1px solid #d8e1ee;
    display: flex; justify-content: space-between; font-size: 10px; color: #8a9ab0;
}
