/* admin-theme.css */
:root {
    /* Ouroboros Palette */
    --primary-color: #A977EC;
    --bg-color: #141325;

    /* Derived complementary shades */
    --input-bg: #1E1D36;
    --text-main: #E0E0E0;
    --text-muted: #A0A0B0;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-wrapper {
    background-color: rgba(30, 29, 54, 0.6);
    padding: 48px 40px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 380px;
    border: 1px solid rgba(169, 119, 236, 0.15);
    backdrop-filter: blur(10px);
}

.brand-title {
    text-align: center;
    font-size: 28px;
    font-weight: 300;
    letter-spacing: 4px;
    margin-bottom: 36px;
    color: var(--primary-color);
    text-transform: uppercase;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    letter-spacing: 1px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.form-group input {
    width: 100%;
    padding: 14px;
    background-color: var(--input-bg);
    border: 1px solid #33324D;
    border-radius: 8px;
    color: white;
    font-size: 15px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 12px rgba(169, 119, 236, 0.25);
    background-color: #232240;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-color);
    color: var(--bg-color);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    margin-top: 12px;
}

.submit-btn:hover {
    background-color: #c09af0;
}

.submit-btn:active {
    transform: scale(0.98);
}

.error-banner {
    color: #ff8787;
    background-color: rgba(255, 135, 135, 0.1);
    border: 1px solid rgba(255, 135, 135, 0.3);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 24px;
    text-align: center;
    font-size: 14px;
}

/* --- Admin Layout Overrides --- */
body.admin-layout {
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    height: 100vh;
    overflow: hidden; /* Prevent body scroll, let main-content scroll */
}

/* --- Mobile Header --- */
.mobile-header {
    display: none;
    background-color: var(--input-bg);
    padding: 16px 24px;
    border-bottom: 1px solid rgba(169, 119, 236, 0.15);
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    position: fixed;
    top: 0;
    z-index: 900;
}

.brand-title-small {
    color: var(--primary-color);
    font-size: 18px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.menu-toggle {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 24px;
    cursor: pointer;
}

/* --- Sidebar Drawer --- */
.sidebar {
    width: 280px;
    background-color: rgba(30, 29, 54, 0.95);
    border-right: 1px solid rgba(169, 119, 236, 0.15);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.sidebar-header {
    padding: 32px 24px 24px;
    text-align: center;
    border-bottom: 1px solid rgba(169, 119, 236, 0.1);
}

.sidebar-header .brand-title {
    margin-bottom: 8px;
    font-size: 24px;
}

.admin-badge {
    font-size: 11px;
    color: var(--primary-color);
    letter-spacing: 2px;
    text-transform: uppercase;
    background-color: rgba(169, 119, 236, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.sidebar-menu {
    list-style: none;
    padding: 24px 0;
    margin: 0;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-menu li {
    margin-bottom: 4px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 15px;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-menu a i {
    width: 24px;
    font-size: 18px;
    margin-right: 12px;
    text-align: center;
    transition: color 0.2s ease;
}

/* Hover & Active States */
.sidebar-menu a:hover,
.sidebar-menu li.active a {
    color: var(--text-main);
    background-color: rgba(169, 119, 236, 0.08);
}

.sidebar-menu li.active a {
    border-left-color: var(--primary-color);
    color: var(--primary-color);
}

.sidebar-menu li.active a i {
    color: var(--primary-color);
    text-shadow: 0 0 8px rgba(169, 119, 236, 0.5); /* Esoteric glow */
}

/* --- Sidebar Footer --- */
.sidebar-footer {
    padding: 24px;
    border-top: 1px solid rgba(169, 119, 236, 0.1);
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px;
    background-color: transparent;
    color: #ff8787;
    border: 1px solid rgba(255, 135, 135, 0.2);
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 1px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.logout-btn i {
    margin-right: 8px;
}

.logout-btn:hover {
    background-color: rgba(255, 135, 135, 0.1);
    border-color: #ff8787;
}

/* --- Main Content Area --- */
.main-content {
    flex-grow: 1;
    background-color: var(--bg-color);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.page-header {
    padding: 32px 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.page-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 400;
    color: var(--text-main);
}

.content-wrapper {
    padding: 0 48px 48px;
    flex-grow: 1;
}

/* --- Responsive/Adaptive Design --- */
@media (max-width: 992px) {
    body.admin-layout {
        flex-direction: column;
    }

    .mobile-header {
        display: flex;
    }

    .sidebar {
        position: fixed;
        top: 60px; /* Below mobile header */
        bottom: 0;
        left: 0;
        transform: translateX(-100%);
        width: 280px;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-header {
        display: none; /* Hide brand in sidebar on mobile, since it's in the top bar */
    }

    .main-content {
        margin-top: 60px; /* Offset for mobile header */
    }

    .page-header, .content-wrapper {
        padding: 24px;
    }
}

/* --- Dashboard Specific Styles --- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.subtitle {
    margin: 4px 0 0 0;
    color: var(--text-muted);
    font-size: 14px;
}

/* Primary Action Button */
.action-btn {
    background-color: var(--primary-color);
    color: var(--bg-color);
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn:hover {
    background-color: #c09af0;
    box-shadow: 0 0 15px rgba(169, 119, 236, 0.3);
}

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

.stat-card {
    background-color: rgba(30, 29, 54, 0.6);
    border: 1px solid rgba(169, 119, 236, 0.15);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border-color: rgba(169, 119, 236, 0.3);
}

.stat-icon {
    background-color: rgba(169, 119, 236, 0.1);
    color: var(--primary-color);
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
}

.stat-details h3 {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

.stat-trend {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-trend.positive {
    color: #69db7c;
}

.stat-trend.negative {
    color: #ff8787;
}

.stat-trend.neutral {
    color: var(--primary-color);
}

/* --- Dashboard Panels --- */
.dashboard-panels {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.panel {
    background-color: rgba(30, 29, 54, 0.6);
    border: 1px solid rgba(169, 119, 236, 0.15);
    border-radius: 12px;
    padding: 24px;
}

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

.panel-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 1px;
}

.text-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.2s;
}

.text-link:hover {
    opacity: 0.8;
}

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

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

.ouroboros-table th {
    padding: 12px 16px;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(169, 119, 236, 0.15);
}

.ouroboros-table td {
    padding: 16px;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ouroboros-table tr:hover td {
    background-color: rgba(169, 119, 236, 0.03);
}

/* --- Badges --- */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.badge-pending {
    background-color: rgba(255, 212, 59, 0.1);
    color: #ffd43b;
    border: 1px solid rgba(255, 212, 59, 0.2);
}

.badge-active {
    background-color: rgb(0 234 116);
    color: white;
    border: 1px solid rgb(0 234 116);
    box-shadow: 0 0 8px rgb(0 255 149 / 0.2);
}

.badge-completed {
    background-color: rgba(105, 219, 124, 0.1);
    color: #69db7c;
    border: 1px solid rgba(105, 219, 124, 0.2);
}

/* --- Upcoming List --- */
.upcoming-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.upcoming-list li {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.upcoming-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.event-time {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 14px;
    min-width: 48px;
}

.event-info strong {
    display: block;
    color: var(--text-main);
    font-size: 15px;
    margin-bottom: 4px;
}

.event-info span {
    color: var(--text-muted);
    font-size: 13px;
}

/* Responsive Panel adjustments */
@media (max-width: 1200px) {
    .dashboard-panels {
        grid-template-columns: 1fr; /* Stack panels on smaller screens */
    }
}

/* --- Table Toolbar & Searching --- */
.table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

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

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    background-color: var(--input-bg);
    border: 1px solid rgba(169, 119, 236, 0.2);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 14px;
    transition: all 0.2s;
    box-sizing: border-box;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(169, 119, 236, 0.15);
}

.filter-btn {
    background-color: rgba(30, 29, 54, 0.8);
    border: 1px solid rgba(169, 119, 236, 0.2);
    color: var(--text-main);
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    background-color: rgba(169, 119, 236, 0.1);
}

/* --- Pagination Styles --- */
.pagination-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
    gap: 16px;
}

.page-stats {
    font-size: 13px;
    color: var(--text-muted);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background-color: var(--input-bg);
    border: 1px solid rgba(169, 119, 236, 0.2);
    border-radius: 6px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}

.page-btn:not(.disabled):hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
    border-color: var(--primary-color);
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: transparent;
}

.page-indicator {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* --- Order Details Specific Styles --- */
.breadcrumbs {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs i {
    font-size: 10px;
}

.badge-lg {
    font-size: 14px;
    padding: 8px 16px;
}

/* Grid Layout */
.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

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

.details-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Customer Info Card */
.customer-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.customer-avatar {
    width: 56px;
    height: 56px;
    background-color: var(--input-bg);
    border: 1px solid rgba(169, 119, 236, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: var(--primary-color);
}

.customer-details h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
    color: var(--text-main);
}

.customer-details p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: var(--text-muted);
}

.text-sm {
    font-size: 13px;
}

/* Order Breakdown */
.item-details {
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 16px;
}

.item-name {
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-muted);
}

.text-discount {
    color: #ffd43b;
}

.total-row {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
}

/* Input Groups */
.input-group {
    display: flex;
    gap: 8px;
}

.input-group input {
    flex-grow: 1;
}

.btn-secondary {
    background-color: rgba(169, 119, 236, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(169, 119, 236, 0.3);
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background-color: rgba(169, 119, 236, 0.2);
}

.current-appointment {
    margin-bottom: 24px;
    font-size: 15px;
}

.current-appointment .label {
    color: var(--text-muted);
    margin-right: 8px;
}

.panel-divider {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin: 24px 0;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: rgba(255, 255, 255, 0.05);
}

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

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -24px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--input-bg);
    border: 2px solid rgba(169, 119, 236, 0.3);
    box-sizing: border-box;
}

.timeline-marker.bg-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(169, 119, 236, 0.4);
}

.timeline-content h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 500;
}

.timeline-content .time {
    font-size: 12px;
    color: var(--text-muted);
}

/* Danger Zone */
.danger-zone {
    border-color: rgba(255, 135, 135, 0.3);
}

.danger-zone .panel-header h2 {
    color: #ff8787;
}

.warning-text {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-warning, .btn-danger {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border: none;
}

.btn-warning {
    background-color: rgba(255, 212, 59, 0.1);
    color: #ffd43b;
    border: 1px solid rgba(255, 212, 59, 0.3);
}

.btn-warning:hover {
    background-color: rgba(255, 212, 59, 0.2);
}

.btn-danger {
    background-color: rgba(255, 135, 135, 0.1);
    color: #ff8787;
    border: 1px solid rgba(255, 135, 135, 0.3);
}

.btn-danger:hover {
    background-color: rgba(255, 135, 135, 0.2);
}

/* --- Modals --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 9, 20, 0.85); /* Darker backdrop */
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--bg-color);
    border: 1px solid rgba(169, 119, 236, 0.2);
    border-radius: 12px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

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

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    transition: color 0.2s;
}

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

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    background-color: rgba(30, 29, 54, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0 0 12px 12px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Button utility for modals */
.btn-primary {
    background-color: var(--primary-color);
    color: var(--bg-color);
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

/* --- Refund Presets (Radio Cards) --- */
.refund-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.refund-radio {
    cursor: pointer;
}

.refund-radio input {
    display: none; /* Hide the actual radio button */
}

.radio-card {
    background-color: var(--input-bg);
    border: 1px solid rgba(169, 119, 236, 0.2);
    border-radius: 8px;
    padding: 12px 0;
    text-align: center;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s;
}

/* Active state for the selected radio card */
.refund-radio input:checked + .radio-card {
    background-color: rgba(169, 119, 236, 0.15);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 12px rgba(169, 119, 236, 0.2);
}

.refund-radio:hover .radio-card {
    border-color: rgba(169, 119, 236, 0.5);
}

/* --- Custom Checkboxes for Filter --- */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 32px;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
    color: var(--text-main);
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: var(--input-bg);
    border: 1px solid rgba(169, 119, 236, 0.3);
    border-radius: 4px;
    transition: all 0.2s;
}

.custom-checkbox:hover input ~ .checkmark {
    border-color: var(--primary-color);
}

.custom-checkbox input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.custom-checkbox .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid var(--bg-color);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Ensure input group fits modal */
.input-group input#customRefund {
    border-radius: 8px 0 0 8px;
    border-right: none;
}

/* --- Services Grid Layout --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.service-card {
    cursor: pointer;
    background-color: rgba(30, 29, 54, 0.6);
    border: 1px solid rgba(169, 119, 236, 0.15);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    border-color: rgba(169, 119, 236, 0.4);
}

.card-header {
    padding: 20px 20px 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.service-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--input-bg);
}

.service-icon.fallback-icon {
    background-color: rgba(169, 119, 236, 0.1);
    color: var(--primary-color);
    font-size: 20px;
}

.card-body {
    padding: 16px 20px;
    flex-grow: 1;
}

.card-body h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: var(--text-main);
}

.service-desc {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    /* Truncate to 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.service-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.meta-item i {
    margin-right: 4px;
}

.card-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.1);
}

.service-price strong {
    font-size: 18px;
    color: var(--text-main);
}

.card-actions {
    display: flex;
    gap: 12px;
}

.action-icon {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: opacity 0.2s, color 0.2s;
    padding: 4px;
}

.action-icon:hover {
    opacity: 0.8;
}

.text-danger {
    color: #ff8787;
}

.text-danger:hover {
    color: #ff5c5c;
}

/* --- Tabs UI --- */
.tabs-header {
    display: flex;
    gap: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 24px;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 500;
    padding: 12px 0;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: var(--text-main);
}

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

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

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

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

/* --- Compact 2-Column Grid Layout --- */
.content-grid {
    display: grid;
    /* minmax(450px) ensures 2 per row on standard desktop, breaking to 1 on smaller screens */
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 20px;
}

.grid-full {
    grid-column: 1 / -1;
    padding: 48px;
    text-align: center;
    border: 1px dashed rgba(169, 119, 236, 0.3);
    border-radius: 12px;
}

.grid-full h4 {
    margin: 16px 0 0 0;
    color: var(--text-muted);
}

/* --- Compact Card Structure --- */
.compact-card {
    display: flex;
    background-color: rgba(30, 29, 54, 0.6);
    border: 1px solid rgba(169, 119, 236, 0.15);
    border-radius: 12px;
    overflow: hidden;
    height: 180px; /* Fixed height keeps grid aligned */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.compact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(169, 119, 236, 0.4);
}

.card-thumb {
    width: 140px;
    flex-shrink: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    background-color: var(--input-bg);
}

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

.card-thumb-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    color: rgba(169, 119, 236, 0.2);
}

.card-details {
    flex-grow: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}

.card-header-row h3 {
    margin: 0;
    font-size: 16px;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-desc {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-metrics {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: auto; /* Pushes footer to the bottom */
    flex-wrap: wrap;
}

.card-metrics i {
    margin-right: 4px;
    color: rgba(255, 255, 255, 0.5);
}

.card-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 12px;
}

.card-price {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
}

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

.text-xs {
    font-size: 10px;
    padding: 2px 6px;
}

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

    .compact-card {
        height: auto;
    }
}

/* --- Blog Grid Layout --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.blog-card {
    background-color: rgba(30, 29, 54, 0.6);
    border: 1px solid rgba(169, 119, 236, 0.15);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    border-color: rgba(169, 119, 236, 0.4);
}

/* Cover Image (16:9 Aspect Ratio) */
.blog-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: var(--input-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.blog-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-cover img {
    transform: scale(1.05);
}

.blog-cover-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 40px;
    color: rgba(169, 119, 236, 0.2);
}

/* Blog Body */
.blog-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.blog-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    color: var(--text-main);
    line-height: 1.4;
    /* Limit title to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-excerpt {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    /* Limit excerpt to 3 lines */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: auto; /* Push footer down */
}

/* Blog Footer */
.blog-footer {
    padding: 16px 20px;
    background-color: rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.blog-id {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.5px;
}

/* --- Admin Data Table Styles --- */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th {
    padding: 16px 20px;
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-table td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    font-size: 14px;
    vertical-align: middle;
}

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

.admin-table tbody tr:hover {
    background-color: rgba(169, 119, 236, 0.05);
}

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

/* User Cell & Avatar */
.table-cell-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #845ec2);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
    text-transform: uppercase;
}

.user-name-block {
    display: flex;
    flex-direction: column;
}

.user-name-block strong {
    font-size: 15px;
    color: var(--text-main);
    margin-bottom: 2px;
}

.text-xs {
    font-size: 11px;
    color: rgb(255 255 255);
}

/* Specific Cell Blocks */
.contact-block, .birth-block {
    display: flex;
    flex-direction: column;
}

.contact-block i, .birth-block i {
    width: 16px;
    text-align: center;
    margin-right: 6px;
    font-size: 13px;
}

/* Reusing Pagination CSS from Blogs */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding: 16px 24px;
    background-color: rgba(30, 29, 54, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.pagination-info {
    font-size: 13px;
    color: var(--text-muted);
}

.pagination-info strong {
    color: var(--text-main);
    font-weight: 600;
}

.pagination-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.page-btn {
    padding: 8px 14px;
    border-radius: 6px;
    background-color: var(--input-bg);
    border: 1px solid rgba(169, 119, 236, 0.2);
    color: var(--text-main);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-btn:hover:not(.disabled) {
    background-color: rgba(169, 119, 236, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-btn.active {
    background-color: var(--primary-color);
    color: var(--bg-color);
    border-color: var(--primary-color);
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}