@import url('https://fonts.googleapis.com/css2?family=Vazir:wght@400;500;700&display=swap');

/* CSS Variables */
:root {
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --border-color: #dfe6e9;
}

body.dark-mode {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-card: #2d2d2d;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --border-color: #404040;
}

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

body {
    font-family: 'Vazir', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    direction: rtl;
}

/* Header */
#app-header {
    background-color: #415076;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-logo h1 {
    font-size: 18px;
    font-weight: 700;
}

.header-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.header-btn:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Container */
#app-container {
    max-width: 600px;
    margin: 20px auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    min-height: calc(100vh - 120px);
    overflow: hidden;
}

/* Pages */
.page {
    display: none;
    padding: 30px 20px;
    animation: fadeIn 0.3s;
}

.page.active {
    display: block;
}

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

/* Login Page */
.login-box {
    max-width: 400px;
    margin: 50px auto;
}

.login-box h2 {
    text-align: center;
    color: #415076;
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    font-family: 'Vazir', sans-serif;
}

.form-group input:focus {
    outline: none;
    border-color: #3751B8;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 15px;
    background-color: #3751B8;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s;
    font-family: 'Vazir', sans-serif;
}

.btn-primary:hover {
    background-color: #2a3d8f;
}

.btn-secondary {
    width: 100%;
    padding: 15px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 15px;
    font-family: 'Vazir', sans-serif;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-logout {
    width: 100%;
    padding: 15px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 15px;
    font-family: 'Vazir', sans-serif;
}

.btn-logout:hover {
    background-color: #c82333;
}

/* Home Page */
.home-content {
    text-align: center;
}

.home-content h2 {
    color: #415076;
    margin-bottom: 30px;
}

.inquiry-types {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.inquiry-card {
    background: linear-gradient(135deg, #3751B8 0%, #415076 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 25px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 18px;
    font-family: 'Vazir', sans-serif;
}

.inquiry-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(55, 81, 184, 0.4);
}

.inquiry-card i {
    font-size: 30px;
}

/* Inquiry Pages */
.inquiry-content h2 {
    color: #415076;
    margin-bottom: 30px;
    text-align: center;
}

.plate-input-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.plate-input {
    width: 60px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    border: 3px solid #3751B8;
    border-radius: 10px;
    background: white;
    font-family: 'Vazir', sans-serif;
}

.plate-input:focus {
    outline: none;
    border-color: #415076;
    box-shadow: 0 0 10px rgba(55, 81, 184, 0.3);
}

.plate-input-wide {
    width: 100px;
}

.plate-select {
    width: 80px;
    height: 60px;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    border: 3px solid #3751B8;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    font-family: 'Vazir', sans-serif;
}

.plate-select:focus {
    outline: none;
    border-color: #415076;
}

.motorcycle-plate {
    flex-direction: column;
}

.national-id-input {
    text-align: center;
    margin-bottom: 25px;
}

.input-field {
    width: 100%;
    max-width: 300px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    border: 3px solid #3751B8;
    border-radius: 10px;
    font-family: 'Vazir', sans-serif;
}

.input-field:focus {
    outline: none;
    border-color: #415076;
    box-shadow: 0 0 10px rgba(55, 81, 184, 0.3);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
}

.action-btn {
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.3s;
    font-family: 'Vazir', sans-serif;
}

.action-btn-primary {
    background-color: #3751B8;
    color: white;
    padding: 15px 40px;
    flex: 1;
    max-width: 200px;
}

.action-btn-primary:hover {
    background-color: #2a3d8f;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(55, 81, 184, 0.3);
}

.action-btn:not(.action-btn-primary) {
    width: 60px;
    height: 60px;
    font-size: 24px;
}

.action-btn-disabled {
    background-color: #e0e0e0;
    color: #999;
    cursor: not-allowed;
}

/* Result Container */
.result-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

/* Plate Container - محدود کردن اندازه در صفحات بزرگ */
.plate-container {
    max-width: 600px !important;
    margin: 20px auto !important;
}

@media (max-width: 768px) {
    .plate-container {
        max-width: 100% !important;
    }
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    color: #666;
    font-weight: 500;
}

.result-value {
    color: #333;
    font-weight: 700;
}

.plate-visual {
    background: white;
    border: 3px solid #000;
    border-radius: 10px;
    padding: 15px;
    margin: 20px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    font-size: 28px;
    font-weight: bold;
    max-width: 350px;
    direction: ltr;
}

.plate-section {
    padding: 5px 10px;
}

.judicial-orders {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
}

.judicial-orders-title {
    color: #856404;
    font-weight: bold;
    margin-bottom: 10px;
}

.judicial-orders-content {
    color: #856404;
}

.no-orders {
    color: #28a745;
    background: #d4edda;
    border: 2px solid #28a745;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    margin-top: 15px;
    font-weight: bold;
}

/* Admin Panel */
.admin-menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.admin-menu-btn {
    background: linear-gradient(135deg, #3751B8 0%, #415076 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    font-size: 14px;
    font-family: 'Vazir', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.admin-menu-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(55, 81, 184, 0.4);
}

.admin-menu-btn i {
    font-size: 24px;
}

.admin-section-content {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    min-height: 300px;
}

/* Table Styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid #e0e0e0;
}

.data-table th {
    background-color: #3751B8;
    color: white;
    font-weight: 700;
}

.data-table tr:hover {
    background-color: #f5f5f5;
}

.table-actions {
    display: flex;
    gap: 8px;
}

.btn-edit,
.btn-delete {
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Vazir', sans-serif;
    transition: all 0.3s;
    margin: 0 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-edit {
    background-color: #007bff;
    color: white;
}

.btn-edit:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-delete {
    background-color: #dc3545;
    color: white;
}

.btn-delete:hover {
    background-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #3751B8;
    margin-bottom: 10px;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

/* Loading Overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3751B8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    transition: transform 0.3s;
    z-index: 10000;
    font-family: 'Vazir', sans-serif;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: #28a745;
}

.toast.error {
    background: #dc3545;
}

.toast.info {
    background: #17a2b8;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

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

.modal-header h3 {
    color: #415076;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-close:hover {
    color: #333;
}

/* Responsive */
@media (max-width: 600px) {
    #app-container {
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
    }

    .inquiry-types {
        grid-template-columns: 1fr;
    }

    .admin-menu {
        grid-template-columns: 1fr;
    }

    .plate-input-container {
        flex-wrap: wrap;
    }

    .data-table {
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 8px;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex !important;
}

.modal-content {
    background-color: #fff;
    border-radius: 10px;
    padding: 0;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    color: #415076;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Vazir', sans-serif;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3751B8;
}

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

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.form-actions button {
    padding: 10px 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
    }
}

/* Table Actions */
.table-actions {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.btn-edit,
.btn-delete {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.btn-edit {
    background-color: #3751B8;
    color: white;
}

.btn-edit:hover {
    background-color: #2a3d8f;
}

.btn-delete {
    background-color: #dc3545;
    color: white;
}

.btn-delete:hover {
    background-color: #c82333;
}

/* ========== Dark Mode Styles ========== */
body.dark-mode {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-card: #2d2d2d;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --border-color: #404040;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
    color: var(--text-primary);
}

body.dark-mode #app-header {
    background: #1f1f1f;
}

body.dark-mode .page {
    background-color: var(--bg-secondary);
}

body.dark-mode .login-box,
body.dark-mode .inquiry-content,
body.dark-mode .admin-content,
body.dark-mode .card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
}

body.dark-mode .input-field,
body.dark-mode .form-control,
body.dark-mode select,
body.dark-mode textarea {
    background-color: #3a3a3a;
    border-color: var(--border-color);
    color: var(--text-primary);
}

body.dark-mode .data-table,
body.dark-mode .admin-table {
    background-color: var(--bg-card);
    border-color: var(--border-color);
}

body.dark-mode .btn-primary,
body.dark-mode .btn-success,
body.dark-mode .btn-secondary {
    color: white;
}

body.dark-mode label,
body.dark-mode p,
body.dark-mode span,
body.dark-mode li,
body.dark-mode .admin-menu-btn {
    color: var(--text-primary);
}

body.dark-mode .plate-container {
    background-color: transparent;
}

body.dark-mode .result-item strong {
    color: var(--text-primary);
}

body.dark-mode .result-label,
body.dark-mode .result-value {
    color: var(--text-primary);
}

body.dark-mode .plate-info {
    background-color: #3a3a3a !important;
    color: var(--text-primary) !important;
}

body.dark-mode .plate-info div,
body.dark-mode .plate-info strong {
    color: var(--text-primary) !important;
}

body.dark-mode .no-orders,
body.dark-mode .judicial-orders {
    color: var(--text-primary);
}

body.dark-mode .judicial-orders-title,
body.dark-mode .judicial-orders-content {
    color: var(--text-primary);
}

/* Birth Place Item */
.birth-place-item {
    background: #e3f2fd;
    padding: 10px;
    border-radius: 5px;
    border-right: 4px solid #2196f3;
}

body.dark-mode .birth-place-item {
    background: #1e3a5f !important;
    border-right-color: #64b5f6 !important;
}

body.dark-mode .birth-place-item .result-label,
body.dark-mode .birth-place-item .result-value,
body.dark-mode .birth-place-item strong {
    color: var(--text-primary) !important;
}

body.dark-mode .data-table th,
body.dark-mode .admin-table th {
    background-color: #3a3a3a;
    color: var(--text-primary);
}

body.dark-mode .data-table td,
body.dark-mode .admin-table td {
    border-color: var(--border-color);
    color: var(--text-primary);
}

body.dark-mode .data-table tr:hover,
body.dark-mode .admin-table tr:hover {
    background-color: #3a3a3a;
}

body.dark-mode .result-container {
    background-color: var(--bg-card);
}

body.dark-mode h1, 
body.dark-mode h2, 
body.dark-mode h3, 
body.dark-mode h4 {
    color: var(--text-primary);
}

body.dark-mode .toast {
    background-color: #3a3a3a;
    color: var(--text-primary);
}

/* Dark Mode Toggle Button */
#dark-mode-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 10px;
    border-radius: 5px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#dark-mode-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* ========== Modal System ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-secondary);
    margin: auto;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    font-weight: bold;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    transition: all 0.3s;
}

.modal-close:hover {
    background-color: #dc3545;
    color: white;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: 'IRANSans', Vazir, Tahoma, sans-serif;
    font-size: 14px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
}

body.dark-mode .modal-content {
    background-color: #2d2d2d;
}

body.dark-mode .modal-header,
body.dark-mode .modal-footer {
    border-color: #404040;
}

/* ========== Font Faces ========== */
@font-face {
    font-family: 'IRANSans';
    src: url('../fonts/woff2/IRANSansX-Regular.woff2') format('woff2'),
         url('../fonts/woff/IRANSansX-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'IRANSans';
    src: url('../fonts/woff2/IRANSansX-Bold.woff2') format('woff2'),
         url('../fonts/woff/IRANSansX-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'IRANSans';
    src: url('../fonts/woff2/IRANSansX-Light.woff2') format('woff2'),
         url('../fonts/woff/IRANSansX-Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'B Titr';
    src: url('../fonts/BTitr.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

/* Apply IRANSans to body */
body {
    font-family: 'IRANSans', Vazir, Tahoma, sans-serif;
}

/* Apply B Titr to plates */
.plate-text {
    font-family: 'B Titr', 'IRANSans', Tahoma, sans-serif !important;
    font-weight: bold;
}

/* ========== Settings Page ========== */
.settings-container {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 10px;
}

.settings-section {
    margin: 30px 0;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.settings-section h4 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-primary);
}

.settings-group {
    margin: 20px 0;
    padding: 15px;
    background: rgba(0, 123, 255, 0.05);
    border-radius: 5px;
    border-right: 3px solid #007bff;
}

.settings-group h5 {
    margin-bottom: 15px;
    color: var(--text-primary);
}

.settings-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.settings-info {
    margin-top: 30px;
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 5px;
    color: #856404;
}

.settings-info ul {
    margin: 10px 0 0 20px;
}

.settings-info li {
    margin: 5px 0;
}

body.dark-mode .settings-container {
    background: var(--bg-secondary);
}

body.dark-mode .settings-section {
    background: var(--bg-card);
    border-color: var(--border-color);
}

body.dark-mode .settings-group {
    background: rgba(0, 123, 255, 0.1);
}

body.dark-mode .settings-info {
    background: #3a3a00;
    border-color: #666600;
    color: #ffeb3b;
}

/* ========== Judicial Orders Dark Mode Fix ========== */
.judicial-orders {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
}

.judicial-orders-title {
    font-weight: bold;
    color: #856404;
    margin-bottom: 10px;
}

.judicial-orders-content {
    color: #856404;
}

body.dark-mode .judicial-orders {
    background: #3a1f00 !important;
    border-color: #ff6f00 !important;
}

body.dark-mode .judicial-orders-title,
body.dark-mode .judicial-orders-content {
    color: #ffb74d !important;
}

.no-orders {
    background: #d4edda;
    border: 1px solid #28a745;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
    color: #155724;
    text-align: center;
}

body.dark-mode .no-orders {
    background: #1a3a1a !important;
    border-color: #28a745 !important;
    color: #4caf50 !important;
}

/* ========== Fix Dark Mode Background ========== */
body.dark-mode {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
    min-height: 100vh;
}

body.dark-mode #app-container {
    background: transparent;
    min-height: calc(100vh - 70px);
}

body.dark-mode .page {
    background: transparent;
}

/* ========== City Codes Table Improvements ========== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

body.dark-mode .card {
    background: var(--bg-card);
    border-color: var(--border-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.card h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
}

.admin-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.admin-table th {
    padding: 15px;
    text-align: center;
    font-weight: bold;
    color: white !important;
    border-bottom: 2px solid rgba(255,255,255,0.1);
}

.admin-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.admin-table tbody tr {
    transition: background-color 0.3s;
}

.admin-table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

body.dark-mode .admin-table {
    background: var(--bg-secondary);
}

body.dark-mode .admin-table thead {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

body.dark-mode .admin-table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.2);
}

.btn-success {
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Vazir', sans-serif;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-success:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-success i {
    margin-left: 5px;
}


/* Quick Add Styles */
.quick-add-container {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 10px;
    max-width: 800px;
    margin: 0 auto;
}

.quick-add-description {
    color: var(--text-secondary);
    margin-bottom: 20px;
    text-align: center;
}

.quick-add-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
    justify-content: center;
}

.quick-tab {
    padding: 15px 30px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-family: 'Vazir', sans-serif;
    font-size: 16px;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.quick-tab:hover {
    color: var(--text-primary);
    background: rgba(102, 126, 234, 0.05);
}

.quick-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: bold;
}

.quick-tab i {
    margin-left: 5px;
}

.quick-tab-content {
    display: none;
    animation: fadeIn 0.3s;
}

.quick-tab-content.active {
    display: block;
}

.quick-tab-content h4 {
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
}

.plate-input-group {
    margin-bottom: 20px;
}

.plate-input-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-weight: bold;
}

.plate-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.plate-digit {
    width: 80px;
    text-align: center;
    padding: 15px;
    font-size: 20px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-family: 'B Titr', sans-serif;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: border-color 0.3s;
}

.plate-digit:focus {
    outline: none;
    border-color: #667eea;
}

.plate-letter {
    width: 60px;
    text-align: center;
    padding: 15px;
    font-size: 20px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-family: 'B Titr', sans-serif;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: border-color 0.3s;
}

.plate-letter:focus {
    outline: none;
    border-color: #667eea;
}

body.dark-mode .quick-add-container {
    background: var(--bg-secondary);
}

body.dark-mode .plate-digit,
body.dark-mode .plate-letter {
    background: #3a3a3a;
    border-color: var(--border-color);
    color: var(--text-primary);
}

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

