/* assets/css/admin.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --admin-bg: #f1f5f9;
    --admin-card: #ffffff;
    --admin-text: #0f172a;
    --admin-text-sub: #64748b;
    --admin-border: #e2e8f0;
    
    --accent-color: #4f46e5;
    --accent-hover: #4338ca;
    
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--admin-bg);
    color: var(--admin-text);
    line-height: 1.5;
}

/* Login Page Layout */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
}

.login-card {
    background: var(--admin-card);
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.login-logo {
    font-size: 28px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-subtitle {
    text-align: center;
    color: var(--admin-text-sub);
    font-size: 14px;
    margin-bottom: 30px;
}

/* Alert Styling */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.alert-danger {
    background-color: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

/* Form inputs for admin */
.admin-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--admin-text-sub);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    background: #ffffff;
    transition: all 0.2s;
}

.admin-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.admin-btn-primary {
    width: 100%;
    background-color: var(--accent-color);
    color: #ffffff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.admin-btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
}

.admin-btn-secondary {
    background-color: #ffffff;
    border: 1px solid var(--admin-border);
    color: var(--admin-text);
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.admin-btn-secondary:hover {
    background-color: #f8fafc;
    border-color: var(--admin-text-sub);
}

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

/* Sidebar Navigation */
.admin-sidebar {
    width: 260px;
    background-color: #0f172a;
    color: #ffffff;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}

.sidebar-brand {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-item {
    margin-bottom: 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s;
}

.sidebar-link:hover, .sidebar-item.active .sidebar-link {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.sidebar-link.logout {
    margin-top: auto;
    color: #fca5a5;
}

.sidebar-link.logout:hover {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Main Dashboard Content Area */
.admin-content {
    flex-grow: 1;
    margin-left: 260px;
    padding: 40px;
}

@media (max-width: 1024px) {
    .admin-sidebar {
        width: 70px;
        padding: 30px 10px;
    }
    .sidebar-brand span, .sidebar-link span {
        display: none;
    }
    .admin-content {
        margin-left: 70px;
        padding: 24px;
    }
}

/* Header row */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--admin-border);
    padding-bottom: 20px;
}

.admin-title-desc h2 {
    font-size: 26px;
    font-weight: 800;
}

.admin-title-desc p {
    color: var(--admin-text-sub);
    font-size: 14px;
}

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

.stat-card {
    background-color: var(--admin-card);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.stat-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--admin-text-sub);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
}

/* Table Area */
.admin-panel-card {
    background-color: var(--admin-card);
    border: 1px solid var(--admin-border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 30px;
}

.card-header-bar {
    padding: 20px 24px;
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.card-header-title {
    font-size: 18px;
    font-weight: 700;
}

.search-filters-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.admin-table-container {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
}

.admin-table th {
    background-color: #f8fafc;
    color: var(--admin-text-sub);
    font-weight: 600;
    padding: 14px 24px;
    border-bottom: 1px solid var(--admin-border);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.05em;
}

.admin-table td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--admin-border);
}

.admin-table tr:hover {
    background-color: #f8fafc;
}

/* Checkbox alignment */
.chk-col {
    width: 50px;
    text-align: center;
}

/* Badges */
.badge-admin {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
}

.badge-available {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-sold {
    background-color: #fee2e2;
    color: #b91c1c;
}

/* Actions cell */
.actions-cell {
    display: flex;
    gap: 8px;
}

.action-btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--admin-border);
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--admin-text);
    text-decoration: none;
    transition: all 0.2s;
}

.action-btn-icon:hover {
    background-color: #f8fafc;
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.action-btn-icon.del:hover {
    border-color: var(--danger);
    color: var(--danger);
    background-color: #fef2f2;
}

/* Bulk actions row */
.bulk-actions-wrapper {
    padding: 16px 24px;
    background-color: #f8fafc;
    border-top: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    gap: 16px;
}

.bulk-select {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--admin-border);
    font-family: inherit;
    font-size: 13px;
    outline: none;
}

/* Edit / Add Forms */
.form-panel {
    padding: 30px;
}

.admin-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 20px;
}

@media (max-width: 640px) {
    .admin-grid-2 {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.form-actions-bar {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--admin-border);
}

/* Preview Tags Area */
.preview-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    min-height: 26px;
}

/* Settings Area styles */
.settings-section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--admin-border);
    color: var(--accent-color);
}

/* Pagination */
.pagination-wrapper {
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--admin-border);
}

.pag-info {
    font-size: 13px;
    color: var(--admin-text-sub);
}

.pag-buttons {
    display: flex;
    gap: 8px;
}

.pag-btn {
    padding: 6px 12px;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    background: #ffffff;
    cursor: pointer;
    font-size: 13px;
    text-decoration: none;
    color: var(--admin-text);
    transition: all 0.2s;
}

.pag-btn:hover {
    border-color: var(--accent-color);
    background-color: #f8fafc;
}

.pag-btn.active {
    background-color: var(--accent-color);
    color: #ffffff;
    border-color: var(--accent-color);
}

.pag-btn.disabled {
    pointer-events: none;
    opacity: 0.5;
}

/* Mobile Header, Overlay and Collapsible Sidebar Drawer */
.admin-mobile-header {
    display: none;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 768px) {
    /* Mobile Toggle Header */
    .admin-mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        background-color: #0f172a;
        color: #ffffff;
        padding: 0 16px;
        z-index: 98;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
    
    .sidebar-toggle-btn {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.15);
        color: #ffffff;
        padding: 8px;
        border-radius: 8px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
    }
    
    .sidebar-toggle-btn:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: #ffffff;
    }
    
    .mobile-brand-title {
        font-size: 16px;
        font-weight: 800;
        letter-spacing: 0.05em;
        background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    
    /* Off-canvas slide-out sidebar */
    .admin-sidebar {
        width: 280px !important;
        position: fixed !important;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 24px 20px !important;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.25);
    }
    
    .admin-sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-brand span, .sidebar-link span {
        display: inline !important;
    }
    
    .sidebar-brand {
        margin-bottom: 30px;
    }
    
    /* Main layout shift */
    .admin-content {
        margin-left: 0 !important;
        padding: 80px 16px 40px 16px !important; /* Offset for fixed mobile header */
    }
    
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 24px;
    }
    
    .admin-header .admin-btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .stats-grid, .stats-grid-premium {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .stat-card-premium {
        padding: 16px !important;
    }
    
    .card-header-bar {
        padding: 16px;
    }
    
    .search-filters-bar {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-filters-bar input, .search-filters-bar select, .search-filters-bar button {
        width: 100%;
    }
    
    .bulk-actions-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px;
    }
    
    .bulk-actions-wrapper select, .bulk-actions-wrapper button {
        width: 100%;
    }
    
    .admin-table th, .admin-table td {
        padding: 12px 16px;
    }
    
    .form-panel {
        padding: 16px;
    }
    
    .settings-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 8px;
        scrollbar-width: thin;
        gap: 8px;
        margin-bottom: 20px;
    }
    
    .settings-tab-btn {
        flex-shrink: 0;
        white-space: nowrap;
        padding: 10px 16px;
    }
    
    .pagination-wrapper {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
        text-align: center;
    }
}

