/* ============================================
   Proptefy Dashboard - WordPress-like Admin CSS
   ============================================ */

/* --- CSS Variables --- */
:root {
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #DBEAFE;
    --primary-50: #EFF6FF;
    --sidebar-bg: #1e293b;
    --sidebar-hover: rgba(255,255,255,0.05);
    --sidebar-active-bg: rgba(37,99,235,0.1);
    --sidebar-active-border: #2563EB;
    --sidebar-active-text: #60a5fa;
    --sidebar-text: #94a3b8;
    --sidebar-width: 260px;
    --topbar-height: 64px;
    --bg: #f1f5f9;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --success: #16a34a;
    --success-bg: #dcfce7;
    --success-border: #bbf7d0;
    --error: #dc2626;
    --error-bg: #fee2e2;
    --error-border: #fecaca;
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --warning-border: #fde68a;
    --info: #2563EB;
    --info-bg: #dbeafe;
    --info-border: #bfdbfe;
    --purple: #9333ea;
    --purple-bg: #f3e8ff;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --transition: all 0.2s ease;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* --- Reset & Global --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--gray-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }
table { border-collapse: collapse; width: 100%; }

/* --- Layout: Admin Wrapper --- */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--gray-600); border-radius: 4px; }

.sidebar-brand {
    padding: 20px 24px;
    background: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.sidebar-brand h2 {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
}

.sidebar-brand span { color: var(--primary); }

/* --- Sidebar Navigation --- */
.sidebar-nav {
    padding: 16px 0;
    flex: 1;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 24px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    position: relative;
}

.sidebar-nav a:hover {
    background: var(--sidebar-hover);
    color: #e2e8f0;
}

.sidebar-nav a.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
    border-left-color: var(--sidebar-active-border);
}

.sidebar-nav a i {
    width: 20px;
    text-align: center;
    font-size: 15px;
}

.sidebar-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    margin-left: auto;
    flex-shrink: 0;
}

/* --- Sidebar User --- */
.sidebar-user {
    padding: 16px 24px;
    background: var(--gray-900);
    border-top: 1px solid #334155;
    flex-shrink: 0;
}

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

.sidebar-user .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.sidebar-user .user-name {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user .user-role {
    font-size: 12px;
    color: var(--sidebar-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ef4444;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-user a:hover { color: #f87171; }

/* --- Main Content --- */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 24px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Topbar --- */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 0 24px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    height: var(--topbar-height);
    flex-shrink: 0;
}

.topbar h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-user-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
}

.topbar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--gray-700);
    padding: 8px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.hamburger:hover { background: var(--gray-100); }

/* --- Flash Messages --- */
.flash {
    padding: 14px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.flash.success {
    background: var(--success-bg);
    color: #166534;
    border-color: var(--success-border);
}

.flash.error {
    background: var(--error-bg);
    color: #991b1b;
    border-color: var(--error-border);
}

.flash.warning {
    background: var(--warning-bg);
    color: #92400e;
    border-color: var(--warning-border);
}

.flash.info {
    background: var(--info-bg);
    color: #1e40af;
    border-color: var(--info-border);
}

/* --- Stats Grid --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-icon.yellow { background: var(--warning-bg); color: var(--warning); }
.stat-icon.red { background: var(--error-bg); color: var(--error); }
.stat-icon.purple { background: var(--purple-bg); color: var(--purple); }

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
}

.stat-label {
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 500;
}

/* --- Cards --- */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid var(--gray-100);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
}

.card-body {
    padding: 24px;
}

.card-body-flush { padding: 0; }

/* --- Tables --- */
.table-wrap {
    overflow-x: auto;
}

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

.table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}

.table td {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background: var(--gray-50);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    line-height: 1.5;
    font-family: var(--font);
    white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }

.btn-secondary { background: var(--white); color: var(--gray-700); border-color: var(--gray-300); }
.btn-secondary:hover { background: var(--gray-50); border-color: var(--gray-400); color: var(--gray-800); }

.btn-danger { background: var(--error); color: #fff; border-color: var(--error); }
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; color: #fff; }

.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { background: #15803d; border-color: #15803d; color: #fff; }

.btn-warning { background: var(--warning); color: #fff; border-color: var(--warning); }
.btn-warning:hover { background: #d97706; border-color: #d97706; color: #fff; }

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; }

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
    border-color: transparent;
}
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-800); transform: none; box-shadow: none; }

/* --- Badges --- */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

.badge-pending { background: var(--warning-bg); color: #92400e; }
.badge-approved, .badge-active, .badge-success { background: var(--success-bg); color: #166534; }
.badge-rejected, .badge-danger { background: var(--error-bg); color: #991b1b; }
.badge-primary { background: var(--primary-light); color: #1e40af; }
.badge-buyer { background: var(--primary-light); color: #1e40af; }
.badge-seller { background: var(--purple-bg); color: #6b21a8; }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }
.badge-warning { background: var(--warning-bg); color: #92400e; }
.badge-info { background: var(--info-bg); color: #1e40af; }

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--gray-800);
    font-family: var(--font);
    transition: all 0.15s ease;
    line-height: 1.5;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.form-control::placeholder { color: var(--gray-400); }

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

textarea.form-control { resize: vertical; min-height: 100px; }

.form-text {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}

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

.form-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid var(--gray-100);
    margin-top: 8px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.form-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.form-check label {
    font-size: 14px;
    color: var(--gray-700);
    cursor: pointer;
}

/* --- Alerts --- */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success { background: var(--success-bg); color: #166534; border: 1px solid var(--success-border); }
.alert-error { background: var(--error-bg); color: #991b1b; border: 1px solid var(--error-border); }
.alert-warning { background: var(--warning-bg); color: #92400e; border: 1px solid var(--warning-border); }
.alert-info { background: var(--info-bg); color: #1e40af; border: 1px solid var(--info-border); }

/* --- Modal --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

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

.modal {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 28px;
    width: 90%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.2s ease;
}

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

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

.modal-header h3 { font-size: 18px; font-weight: 600; }

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--gray-400);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    transition: var(--transition);
}

.modal-close:hover { background: var(--gray-100); color: var(--gray-700); }

/* --- Dropdown --- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    padding: 6px;
    z-index: 100;
    display: none;
}

.dropdown-menu.show { display: block; }

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--gray-700);
    border-radius: 6px;
    transition: var(--transition);
}

.dropdown-menu a:hover {
    background: var(--gray-50);
    color: var(--primary);
}

/* --- Pagination --- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 20px;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius);
    transition: var(--transition);
    text-decoration: none;
}

.pagination a {
    color: var(--gray-600);
    background: var(--white);
    border: 1px solid var(--gray-200);
}

.pagination a:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    color: var(--gray-800);
}

.pagination .active {
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--primary);
}

.pagination .disabled {
    color: var(--gray-300);
    cursor: not-allowed;
}

/* --- Search Bar --- */
.search-bar {
    margin-bottom: 20px;
}

.search-bar form {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 480px;
}

.search-bar .form-control {
    flex: 1;
}

/* --- Tabs --- */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 2px;
    border-bottom: 2px solid var(--gray-200);
}

.tabs .tab {
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-500);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
    white-space: nowrap;
}

.tabs .tab:hover {
    color: var(--gray-700);
}

.tabs .tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--gray-500);
}

.empty-state i {
    font-size: 48px;
    color: var(--gray-300);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    margin-bottom: 20px;
}

/* --- Quick Actions --- */
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.quick-action {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
}

.quick-action:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.quick-action svg {
    width: 20px;
    height: 20px;
    color: var(--gray-400);
    transition: var(--transition);
}

.quick-action:hover svg { color: var(--primary); }

/* --- Content Grid --- */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.content-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* --- Profile Photo Upload --- */
.profile-photo-upload {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--gray-200);
}

.profile-photo-thumb {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.profile-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-photo-thumb i {
    font-size: 32px;
    color: var(--gray-400);
}

/* --- Subscription Card --- */
.subscribe-card {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: #fff;
    border-radius: var(--radius-xl);
    padding: 40px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.subscribe-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}

.subscribe-card::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
}

.subscribe-card h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.subscribe-card p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 24px;
    max-width: 500px;
    position: relative;
    z-index: 1;
}

.subscribe-card .benefits-list {
    list-style: none;
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

.subscribe-card .benefits-list li {
    padding: 6px 0;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.subscribe-card .benefits-list li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    width: 20px;
    height: 20px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    flex-shrink: 0;
}

.subscribe-card .btn {
    position: relative;
    z-index: 1;
}

/* --- Status Timeline --- */
.status-timeline {
    border-left: 2px solid var(--gray-200);
    padding-left: 20px;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gray-300);
    border: 2px solid var(--white);
}

.timeline-item.active::before {
    background: var(--primary);
}

.timeline-item .timeline-status {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
}

.timeline-item .timeline-date {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 2px;
}

/* --- Lead Detail Grid --- */
.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.detail-field {
    margin-bottom: 16px;
}

.detail-label {
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.detail-value {
    font-size: 15px;
    color: var(--gray-800);
    font-weight: 500;
}

/* --- Page Header --- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-900);
}

.page-header p {
    font-size: 14px;
    color: var(--gray-500);
    margin-top: 4px;
}

/* --- Dashboard Footer --- */
.dashboard-footer {
    text-align: center;
    padding: 24px 0;
    margin-top: auto;
    color: var(--gray-500);
    font-size: 13px;
    border-top: 1px solid var(--gray-200);
}

/* --- Auth Pages --- */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.auth-wrap::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}

.auth-wrap::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    padding: 40px;
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

.auth-logo {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.auth-logo span { color: var(--primary); }

.auth-title {
    text-align: center;
    font-size: 15px;
    color: var(--gray-500);
    margin-bottom: 32px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--gray-500);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
}

.auth-footer a:hover { text-decoration: underline; }

/* --- Responsive --- */
@media (max-width: 1024px) {
    .content-grid { grid-template-columns: 1fr; }
    .content-grid-3 { grid-template-columns: 1fr 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0,0,0,0.3);
    }

    .main-content {
        margin-left: 0;
        padding: 16px;
    }

    .hamburger { display: block; }

    .topbar {
        padding: 0 16px;
    }

    .topbar-user-name { display: none; }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .content-grid,
    .content-grid-3 {
        grid-template-columns: 1fr;
    }

    .subscribe-card {
        padding: 28px;
    }

    .subscribe-card h3 { font-size: 20px; }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .quick-actions {
        flex-direction: column;
    }

    .quick-action {
        width: 100%;
        justify-content: center;
    }

    .table th:nth-child(n+4),
    .table td:nth-child(n+4) {
        display: none;
    }
}

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

    .stat-card {
        padding: 16px;
    }

    .auth-card {
        padding: 28px;
    }

    .tabs {
        gap: 0;
    }

    .tabs .tab {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* --- Utilities --- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--gray-500); }
.text-success { color: var(--success); }
.text-danger { color: var(--error); }
.text-sm { font-size: 13px; }
.font-semibold { font-weight: 600; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-full { width: 100%; }
.max-w-lg { max-width: 640px; }
.max-w-md { max-width: 480px; }
