@font-face {
    font-family: 'Logical';
    src: url('../fonts/Logical-1.0.3.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #f5f7fa;
    --surface: #ffffff;
    --surface-muted: #eef1f6;
    --text: #1c1f25;
    --text-muted: #5b6574;
    --border: #d7dde8;
    --primary: #1b5f97;
    --primary-strong: #12486d;
    --success: #198754;
    --danger: #d63031;
    --warning: #f2994a;
    --radius: 12px;
    --shadow: 0 18px 40px rgba(47, 52, 67, 0.08);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
    font-family: 'Logical', "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(180deg, #e8eef7 0%, #f7fbff 100%);
    color: var(--text);
    overflow-x: hidden; /* جلوگیری از اسکرول افقی سراسری */
    position: relative;
}

body {
    direction: rtl;
}

.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(rgba(27, 95, 151, 0.09) 1.5px, transparent 1.5px);
    background-size: 24px 24px;
    pointer-events: none;
    z-index: 1;
}

.search-form input,
.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #ffffff !important;
    color: #1c1f25 !important;
    font-family: 'Logical', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    font-size: 1rem;
    line-height: 1.5;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden; /* جلوگیری از اسکرول افقی محتوا */
    position: relative;
    z-index: 2;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 30px rgba(47, 52, 67, 0.03);
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-strong);
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    height: 42px;
    width: auto;
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 14px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
}

.nav-item .nav-icon {
    transition: transform 0.25s ease, stroke-width 0.25s ease;
}

.nav-item:hover {
    color: var(--primary);
    background: rgba(27, 95, 151, 0.05);
}

.nav-item:hover .nav-icon {
    transform: translateY(-1px);
}

.nav-item.active {
    color: var(--primary-strong);
    background: rgba(27, 95, 151, 0.1);
}

.nav-item.active .nav-icon {
    stroke-width: 2.5px;
}

/* استایل اختصاصی و برجسته دکمه استعلام کارت در دسکتاپ */
.nav-item.nav-scan {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
}

.nav-item.nav-scan:hover {
    color: var(--primary);
    background: rgba(27, 95, 151, 0.05);
    border-color: rgba(27, 95, 151, 0.15);
}

.nav-item.nav-scan.active {
    background: var(--primary-strong);
    color: white;
    border-color: var(--primary-strong);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-user .user-name {
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.topbar-user .role-badge {
    font-size: 0.75rem;
    background: var(--surface-muted);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 99px;
    font-weight: 700;
}

.logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    background: rgba(214, 48, 49, 0.08);
    color: var(--danger);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.logout-btn:hover {
    background: var(--danger);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(214, 48, 49, 0.2);
}

.logout-btn svg {
    transition: transform 0.2s ease;
}

.logout-btn:hover svg {
    transform: translateX(-2px);
}

.container {
    flex: 1;
    width: 95%;
    max-width: 1540px;
    margin: 30px auto;
    padding: 30px;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(27, 95, 151, 0.05), 0 1px 12px rgba(0, 0, 0, 0.01);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 768px) {
    .container {
        width: 100%;
        margin: 12px 0;
        padding: 16px;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.7);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: none;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    }
}


.panel {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.panel h2,
.panel h3 {
    margin: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f2f6fc;
}


tbody tr:hover {
    background: #f9fbff;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    background: var(--surface-muted);
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.button:active {
    transform: translateY(0);
}

.button.primary {
    background: var(--primary);
    color: white;
}

.button.primary:hover {
    background: #154680;
}

.button.secondary {
    background: #eef1f6;
    color: var(--text);
    border: 1px solid var(--border);
}

.button.secondary:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.button.small {
    padding: 8px 14px;
    font-size: 0.9rem;
}

.button.large {
    padding: 14px 32px;
    font-size: 1.1rem;
}

.button.success {
    background: var(--success);
    color: white;
}

.button.success:hover {
    background: #0d5e2d;
}

.button.danger {
    background: var(--danger);
    color: white;
}

.button.danger:hover {
    background: #a02c1a;
    color: white;
}

.button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.button:disabled:hover {
    transform: none;
    box-shadow: none;
}

.action-cell {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
}

.text-muted {
    color: var(--text-muted);
}

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-pending {
    background: #ffeaa7;
    color: #a67c0a;
}

.status-approved {
    background: #d4edda;
    color: #1f5f2e;
}

.status-rejected {
    background: #f8d7da;
    color: #842029;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: var(--surface);
    margin: 10% auto;
    padding: 28px;
    border-radius: 18px;
    width: min(500px, 90%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 18px;
    color: var(--primary-strong);
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
    margin-top: 18px;
}

.flash-message {
    background: #e4f4e7;
    border: 1px solid #c0e1cc;
    color: #1f5f2e;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.flash-message.danger {
    background: #fee7e7;
    border-color: #f5c2c2;
    color: #9f1e1e;
}

.search-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.filter-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--surface-muted);
    color: var(--text);
    text-decoration: none;
    transition: all .2s ease;
}

.tab.active {
    background: var(--primary);
    color: white;
}

.tab:hover {
    background: var(--primary-strong);
    color: white;
}

.info-banner {
    background: #f4f7ff;
    border: 1px solid rgba(27,95,151,0.16);
    padding: 14px 18px;
    border-radius: 14px;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.info-banner strong {
    color: var(--primary-strong);
}

.search-form input,
.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    font-family: 'Logical', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
}

/* استایل خاص برای فیلدهای تاریخ */
.form-field input[type="date"] {
    padding: 10px 12px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: var(--surface) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>') no-repeat right 12px center;
    background-size: 18px;
    padding-right: 42px;
}

.form-field input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    display: none;
}

.form-field input[type="time"] {
    padding: 10px 12px;
    cursor: pointer;
}

.search-form input:focus,
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(27, 95, 151, 0.1);
}

.form-field select {
    cursor: pointer;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 16px;
    padding-right: 14px;
    padding-left: 38px;
}

.form-field textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.search-form button {
    min-width: 130px;
}

.table-wrapper {
    overflow-x: auto;
}

.table-wrapper {
    overflow-x: auto;
    overflow-y: visible;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-top: 15px;
    width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

th, td {
    text-align: center;
    padding: 10px 15px;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
    line-height: 1.5;
    white-space: nowrap;
}

/* ستون نام زائر (تراز راست و اجازه شکستن خط) */
th:nth-child(3), td:nth-child(3) {
    text-align: right;
    white-space: normal;
    min-width: 160px;
}

/* ستون‌های متنی دیگر که می‌توانند کمی منعطف باشند */
th:nth-child(5), td:nth-child(5), /* شهر */
th:nth-child(9), td:nth-child(9)  /* ثبت‌کننده */ {
    white-space: normal;
    min-width: 100px;
}

td:nth-child(3), td:nth-child(10) {
    white-space: normal;
    min-width: 90px;
}

.action-buttons {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.btn-icon {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.9rem !important;
    display: inline-flex !important;
}

tbody tr:hover {
    background: #f9fbff;
}

.empty {
    text-align: center;
    color: var(--text-muted);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.form-section {
    grid-column: 1 / -1;
    background: #eef4ff;
    border: 1px solid rgba(27, 95, 151, 0.16);
    border-radius: 18px;
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.full-width {
    grid-column: 1 / -1;
}

.section-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-strong);
}

.section-note {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.notice-panel {
    background: #fff4e2;
    border-color: rgba(242, 153, 74, 0.24);
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.optional-field {
    background: #f7f9fc;
    padding: 12px;
    border-radius: 14px;
}

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
}

.panel-section {
    margin-top: 24px;
}

.grid-cards,
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
}

.card,
.stat-card {
    background: var(--surface-muted);
    border-radius: var(--radius);
    padding: 18px 20px;
}

.card.warning {
    background: #fff4e2;
    border: 1px solid rgba(242, 153, 74, 0.24);
}

.card h3,
.stat-card span {
    margin: 0 0 8px;
    color: var(--text-muted);
}

.card p,
.stat-card strong {
    margin: 0;
    font-size: 1.8rem;
    color: var(--primary-strong);
}

.link-small {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--primary);
    text-decoration: none;
}

.link-small:hover {
    text-decoration: underline;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
}

.login-card {
    width: min(420px, 100%);
    background: var(--surface);
    border-radius: 24px;
    padding: 32px;
    box-shadow: var(--shadow);
}

.login-card h1 {
    margin-top: 0;
    margin-bottom: 24px;
    font-size: 1.8rem;
}

.login-card label {
    display: block;
    margin-bottom: 18px;
}

.login-card label span {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.login-card input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
}

.login-card button {
    width: 100%;
    margin-top: 8px;
    padding: 13px 16px;
    border: none;
    border-radius: 14px;
    background: var(--primary);
    color: white;
    font-size: 1rem;
    font-family: 'Logical';
    cursor: pointer;
}

.login-card .hint {
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer {
    padding: 18px 28px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* تقویم جلالی */
.jalali-date-input {
    cursor: pointer;
    background: var(--surface) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>') no-repeat right 12px center !important;
    background-size: 18px !important;
    padding-right: 42px !important;
}

#jalali-datepicker-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

#jalali-datepicker-modal.open {
    display: flex;
}

#jalali-calendar-content {
    background: var(--surface);
    border-radius: 16px;
    padding: 20px;
    width: min(380px, 90%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease;
}

.jalali-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.calendar-nav {
    background: var(--surface-muted);
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.2rem;
    color: var(--text);
}

.calendar-nav:hover {
    background: var(--primary);
    color: white;
}

.calendar-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-strong);
}

.jalali-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 12px;
}

.jalali-calendar-weekdays div {
    text-align: center;
    font-weight: 600;
    color: var(--primary);
    padding: 8px 0;
    font-size: 0.85rem;
}

.jalali-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-empty {
    padding: 0;
}

.calendar-day {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text);
    font-size: 0.9rem;
    white-space: nowrap;
}

.calendar-day:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: scale(1.05);
}

.calendar-day.is-today {
    background: #e3f2fd;
    color: var(--primary-strong);
    border: 2px solid var(--primary);
    font-weight: 800;
    box-shadow: 0 0 8px rgba(27, 95, 151, 0.25);
    position: relative;
}

.calendar-day:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.jalali-calendar-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
}

.calendar-btn-today {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(27, 95, 151, 0.2);
    transition: all 0.2s ease;
    width: 100%;
    text-align: center;
}

.calendar-btn-today:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(27, 95, 151, 0.35);
}

.calendar-btn-today:active {
    transform: translateY(0);
}

@media (max-width: 992px) {
    .report-grid {
        grid-template-columns: 1fr !important;
    }
    .form-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    body {
        padding-bottom: 90px;
    }

    .topbar {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 10px 18px;
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    }
    
    .topbar-nav {
        position: fixed;
        bottom: 18px;
        left: 18px;
        right: 18px;
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.45);
        border-radius: 22px;
        padding: 8px 6px;
        box-shadow: 0 10px 30px rgba(47, 52, 67, 0.12);
        z-index: 1000;
        gap: 2px;
        margin: 0;
        width: auto;
    }

    .nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 8px 4px;
        border-radius: 16px;
        font-size: 0.72rem;
        font-weight: 700;
        color: var(--text-muted);
        background: transparent;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        text-align: center;
        border: none !important;
    }

    .nav-item .nav-icon {
        width: 22px;
        height: 22px;
    }

    .nav-item:hover, .nav-item.active {
        background: rgba(27, 95, 151, 0.08);
        color: var(--primary-strong);
    }

    .topbar-user {
        gap: 8px !important;
    }

    .topbar-user .user-name {
        display: none;
    }

    .logout-btn {
        padding: 8px 10px !important;
        border-radius: 50% !important;
        background: rgba(214, 48, 49, 0.08) !important;
        color: var(--danger) !important;
    }

    .logout-btn span {
        display: none;
    }

    .logout-btn svg {
        margin: 0 !important;
        width: 18px;
        height: 18px;
    }

    .panel-header {
        flex-direction: column;
        align-items: stretch;
    }

    .panel-header h2 {
        text-align: center;
        margin-bottom: 10px;
    }

    .form-grid {
        grid-template-columns: 1fr !important;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .big-number {
        font-size: 2rem;
    }

    .modal-content {
        margin: 5% auto;
        padding: 20px;
        width: 95%;
    }

    th, td {
        padding: 8px 10px;
        font-size: 0.75rem;
    }

    .button {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .action-buttons {
        flex-direction: column;
        gap: 5px;
    }
    
    .btn-icon {
        width: 100% !important;
        height: 35px !important;
        border-radius: 6px !important;
    }

    .search-form {
        flex-direction: column;
    }
    .search-form input, .search-form button {
        width: 100% !important;
    }
}

.row-pre-registered {
    background-color: #fff4e5 !important;
    border-right: 4px solid #e67e22 !important;
}

.row-pending {
    background-color: #fff9eb !important;
    border-right: 4px solid #f39c12 !important;
}

/* Settings Layout */
.settings-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 40px;
}

.settings-sidebar {
    width: 250px;
    flex-shrink: 0;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 15px 10px;
}

.settings-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.settings-menu li {
    margin-bottom: 8px;
}

.settings-menu li:last-child {
    margin-bottom: 0;
}

.settings-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.settings-menu a:hover {
    background: var(--surface-muted);
    color: var(--primary);
}

.settings-menu a.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(27, 95, 151, 0.2);
}

.settings-content {
    flex: 1;
    min-width: 0; /* Prevents overflow in flex */
}

.settings-panel {
    display: none;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    animation: fadeIn 0.3s ease;
}

.settings-panel.active {
    display: block;
}

@media (max-width: 768px) {
    .settings-layout {
        flex-direction: column;
        gap: 16px;
    }
    .settings-sidebar {
        width: 100%;
        padding: 10px;
    }
    .settings-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    .settings-menu li {
        margin-bottom: 0;
        flex: 1 1 auto;
    }
    .settings-menu a {
        justify-content: center;
        padding: 10px;
        font-size: 0.9rem;
    }
}
