/* --- CSS RESET & VARIABLES --- */
:root {
    --bg-body: #f3f4f6;
    --bg-card: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;

    --primary: #2563eb;
    --primary-light: #eff6ff;
    --primary-hover: #1d4ed8;
    --success: #16a34a;
    --success-bg: #dcfce7;
    --success-text: #166534;
    --danger: #dc2626;
    --danger-bg: #fee2e2;
    --danger-text: #991b1b;
    --gray-bg: #f3f4f6;
    --gray-text: #374151;

    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 8px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
}

/* --- UTILS --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-end {
    justify-content: flex-end;
}

.gap-4 {
    gap: 1rem;
}

.w-full {
    width: 100%;
}

.mt-4 {
    margin-top: 1rem;
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.btn svg {
    width: 16px;
    height: 16px;
    margin-right: 6px;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: white;
    border-color: var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: var(--bg-body);
}

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

.btn-success:hover {
    opacity: 0.9;
}

/* --- NAVBAR --- */
nav {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
    height: 64px;
    display: flex;
    align-items: center;
}

.nav-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 1.25rem;
}

.brand-logo {
    background: var(--primary);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

/* --- STATS CARDS --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.icon-box.blue {
    background: var(--primary-light);
    color: var(--primary);
}

.icon-box.green {
    background: var(--success-bg);
    color: var(--success);
}

.icon-box.gray {
    background: #e5e7eb;
    color: #4b5563;
}

.stat-info dt {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.stat-info dd {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-main);
}

/* --- TOOLBAR --- */
.toolbar {
    background: var(--bg-card);
    padding: 15px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: space-between;
    align-items: center;
}

.search-wrapper {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-wrapper svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 20px;
    height: 20px;
}

.search-input {
    width: 100%;
    padding: 10px 10px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
}

.search-input:focus {
    border-color: var(--primary);
}

.filter-group {
    display: flex;
    background: var(--bg-body);
    padding: 4px;
    border-radius: 6px;
}

.filter-btn {
    border: none;
    background: transparent;
    padding: 6px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    color: var(--text-muted);
    transition: all 0.2s;
}

.filter-btn.active {
    background: var(--bg-card);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    color: var(--text-main);
}

/* --- TABLE --- */
.table-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    background: #f9fafb;
    padding: 12px 24px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-main);
}

tr:hover {
    background-color: #f9fafb;
    cursor: pointer;
}

.avatar-cell {
    display: flex;
    align-items: center;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 16px;
}

.cell-title {
    font-weight: 500;
    display: block;
}

.cell-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
}

/* --- BADGES --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge svg {
    width: 14px;
    height: 14px;
    margin-right: 4px;
}

.badge-success {
    background: var(--success-bg);
    color: var(--success-text);
}

.badge-gray {
    background: var(--gray-bg);
    color: var(--gray-text);
}

.badge-neutral {
    background: #f3f4f6;
    color: #1f2937;
    font-family: monospace;
}

/* --- MODAL --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(17, 24, 39, 0.5);
    backdrop-filter: blur(4px);
    z-index: 50;
    display: flex;
    justify-content: center;
    align-items: start;
    padding-top: 40px;
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-card);
    width: 100%;
    max-width: 900px;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s;
    margin-bottom: 40px;
}

.modal-overlay.open .modal-content {
    transform: translateY(0);
}

/* Small Modal for Add Form */
.modal-content.small {
    max-width: 500px;
    padding: 0;
}

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

.modal-body {
    padding: 24px;
}

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

.modal-header-bg {
    height: 120px;
    background: linear-gradient(to right, #2563eb, #4f46e5);
}

.close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

.profile-section {
    padding: 0 32px 24px;
    margin-top: -40px;
    display: flex;
    align-items: flex-end;
    border-bottom: 1px solid var(--border-color);
    gap: 24px;
}

.profile-avatar {
    width: 96px;
    height: 96px;
    background: white;
    padding: 4px;
    border-radius: 50%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.profile-avatar-inner {
    background: #e5e7eb;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: #6b7280;
}

.profile-details h1 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.profile-details .role {
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 8px;
}

.meta-tags {
    display: flex;
    gap: 15px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.meta-item svg {
    width: 16px;
    height: 16px;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 32px;
    padding: 32px;
    background: #f9fafb;
}

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

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-gray);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border 0.2s;
}

.form-input:focus {
    border-color: var(--primary);
    outline: none;
    ring: 2px solid var(--primary-light);
}

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

/* Payment Form inside Modal */
.payment-form {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    display: none;
}

.payment-form.active {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.info-box {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.info-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 16px;
}

.info-list li {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: #374151;
}

.info-list svg {
    width: 16px;
    height: 16px;
    margin-right: 10px;
    color: #9ca3af;
}

.list-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.list-label {
    color: var(--text-muted);
}

.list-val {
    font-weight: 500;
}

/* --- LOADING --- */
.loader-container {
    position: fixed;
    inset: 0;
    background: var(--bg-body);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

    100% {
        transform: rotate(360deg);
    }
}

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

.empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
    color: #d1d5db;
}

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

    .profile-section {
        flex-direction: column;
        align-items: flex-start;
        margin-top: -20px;
    }

    th:nth-child(2),
    td:nth-child(2),
    th:nth-child(3),
    td:nth-child(3) {
        display: none;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}
.nava{
    color: white;
    background-color: gray;
    padding: 10px 15px;
    border-radius: 15px;
    text-decoration: none;
    font-weight: 900;
}
.cl>a{
    color: rgb(255, 255, 255);
    background-color: rgb(54, 141, 57);
    padding: 10px 25px;
    border-radius: 15px;
    font-weight: 900;
    text-decoration: none;

}