/* ============================================
   Orders Page Redesign - 2025 Aesthetic
   ============================================ */

:root {
    /* Glassmorphism Variables */
    --glass-bg: rgba(30, 34, 45, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.03);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glass-highlight: rgba(255, 255, 255, 0.05);

    --sidebar-width: 260px;
    --header-height: 80px;

    --deep-space: #0b0e14;
    --neon-blue: #00f2ff;
    --neon-purple: #bc13fe;
    --neon-green: #0aff60;
    --neon-orange: #ff9f0a;
}

/* ============================================
   Layout Components
   ============================================ */

/* Glass Sidebar */
.glass-sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(15, 17, 23, 0.85);
    /* Slightly more opaque for legibility */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    padding: 24px 16px;
    transition: transform 0.3s ease;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 12px 24px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
}

.sidebar-header .logo {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    box-shadow: 0 0 15px rgba(188, 19, 254, 0.4);
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #9ca3af);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.nav-item:hover {
    background: var(--glass-highlight);
    color: #fff;
    transform: translateX(4px);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(0, 242, 255, 0.1), transparent);
    color: var(--neon-blue);
    border-left: 3px solid var(--neon-blue);
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.glass-btn-logout {
    width: 100%;
    margin-top: auto;
    padding: 14px;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
}

.glass-btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}

/* Main Content Adjustment */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 0;
    background: radial-gradient(circle at top right, #1a1d26, #0b0e14);
    min-height: 100vh;
}

/* Glass Header */
.glass-header {
    height: var(--header-height);
    padding: 0 32px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 90;
    /* Optional: glass effect for header too, or just transparent */
    background: rgba(11, 14, 20, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

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

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-left h1 {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    color: #fff;
    letter-spacing: -0.5px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.search-bar-glass {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.search-bar-glass:focus-within {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.1);
}

.search-bar-glass input {
    background: transparent;
    border: none;
    color: #fff;
    outline: none;
    font-size: 14px;
    width: 200px;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.icon-btn:hover {
    color: #fff;
}

.badge-dot {
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    background: var(--neon-orange);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--neon-orange);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.2s;
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.08);
}

.user-profile .avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #FF0080, #7928CA);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #fff;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-info .name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.user-info .role {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .glass-sidebar {
        transform: translateX(-100%);
    }

    .glass-sidebar.active {
        transform: translateX(0);
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-hidden {
        display: none;
    }

    .mobile-only {
        display: block;
    }
}

@media (min-width: 769px) {
    .mobile-only {
        display: none;
    }
}

/* Bento Grid System */
.bento-grid-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.bento-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.bento-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

.bento-bg-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, rgba(0, 0, 0, 0) 60%);
    pointer-events: none;
    z-index: 0;
}

.stat-revenue .bento-bg-glow {
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, rgba(0, 0, 0, 0) 60%);
}

.stat-pending .bento-bg-glow {
    background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 0%, rgba(0, 0, 0, 0) 60%);
}

.bento-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.stat-total .bento-icon {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.stat-revenue .bento-icon {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.stat-pending .bento-icon {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.bento-info {
    position: relative;
    z-index: 1;
}

.bento-info h3 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bento-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.bento-trend {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
}

.bento-trend.positive {
    color: #34d399;
}

.bento-trend.negative {
    color: #ef4444;
}

.bento-trend.neutral {
    color: var(--text-secondary);
}

.bento-trend span {
    font-weight: 600;
}

/* Glass Table Container */
.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--glass-shadow);
}

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

.glass-header h3 {
    font-size: 20px;
    font-weight: 600;
    background: linear-gradient(to right, #fff, #9ca3af);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-controls {
    display: flex;
    gap: 12px;
}

.glass-search,
.glass-filter {
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    transition: 0.2s;
}

.glass-search:focus-within,
.glass-filter:focus-within {
    border-color: var(--accent-primary);
    background: rgba(0, 0, 0, 0.4);
}

.glass-search i,
.glass-filter i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.glass-search input {
    background: transparent;
    border: none;
    padding: 10px 10px 10px 36px;
    color: var(--text-primary);
    width: 240px;
}

.glass-filter select {
    background: transparent;
    border: none;
    padding: 10px 36px 10px 36px;
    color: var(--text-primary);
    appearance: none;
    cursor: pointer;
}

/* Floating Table Styling */
.floating-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    /* The "floating" gap */
}

.floating-table thead th {
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 16px 8px;
    border: none;
}

.floating-table tbody tr {
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.2s ease;
    cursor: pointer;
}

.floating-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: scale(1.005);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.floating-table td {
    padding: 12px 16px;
    border: none;
    vertical-align: middle;
}

.table-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
}

.floating-table td:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.floating-table td:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* Glowing Status Badges */
.status-badge {
    position: relative;
    overflow: hidden;
}

.status-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: 0.5s;
}

.status-badge:hover::before {
    transform: translateX(100%);
}

/* Pagination */
.glass-pagination {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.glass-pagination button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.glass-pagination button:hover:not(:disabled) {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(255, 194, 68, 0.4);
}

.glass-btn-sm {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.glass-btn-sm:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.glass-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Glass Toolbar (Filters/Search) */
.glass-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    padding: 16px;
    border-bottom: 1px solid var(--glass-border);
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    border-radius: 16px;
}

.page-header-inline {
    background: transparent !important;
    backdrop-filter: none !important;
    border-bottom: none !important;
    padding: 0 0 24px 0 !important;
    height: auto !important;
    position: relative !important;
    z-index: 1 !important;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.page-header-inline h3 {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    background: linear-gradient(to right, #fff, #a0aec0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-header-inline .text-secondary {
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.glass-btn-primary {
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(188, 19, 254, 0.3);
    transition: all 0.3s ease;
}

.glass-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(188, 19, 254, 0.5);
}

.glass-select-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.glass-select-wrapper select {
    background: transparent;
    border: none;
    color: #fff;
    outline: none;
    font-size: 14px;
    cursor: pointer;
}

.glass-select-wrapper select option {
    background: var(--deep-space);
    color: #fff;
}
/* ============================================
   Custom Checkbox Styling (Glass Theme)
   ============================================ */
.checkbox-label {
    position: relative;
    padding: 10px 14px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    transition: all 0.2s ease;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.checkbox-label:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Hide default checkbox appearance but keep functionality */
.checkbox-label input[type='checkbox'] {
    appearance: none;
    -webkit-appearance: none;
    background-color: rgba(0, 0, 0, 0.3);
    margin: 0;
    font: inherit;
    color: currentColor;
    width: 20px;
    height: 20px;
    border: 1px solid var(--text-muted);
    border-radius: 6px;
    display: grid;
    place-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
    flex-shrink: 0;
}

/* Checked State */
.checkbox-label input[type='checkbox']:checked {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(255, 194, 68, 0.4);
}

/* Checkmark Icon */
.checkbox-label input[type='checkbox']::before {
    content: '\f00c'; /* FontAwesome check */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 12px;
    color: #1a1d26; /* Dark text on bright background */
    transform: scale(0);
    transition: 0.2s transform ease-in-out;
}

.checkbox-label input[type='checkbox']:checked::before {
    transform: scale(1);
}

/* Label Text Stylling */
.checkbox-label span {
    font-size: 13px;
    color: var(--text-secondary);
    transition: color 0.2s;
    line-height: 1.4;
}

.checkbox-label input[type='checkbox']:checked + span {
    color: #fff;
    font-weight: 500;
}


/* ============================================
   Secondary Button (Cancel/Close)
   ============================================ */
.glass-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
    font-family: inherit;
    font-size: 14px;
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ============================================
   Search Box Glass - Styled
   ============================================ */
.search-box-glass {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    padding: 12px 20px;
    border-radius: 14px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    transition: all 0.3s ease;
    min-width: 280px;
    backdrop-filter: blur(10px);
}

.search-box-glass:focus-within {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15));
    border-color: var(--neon-purple);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.search-box-glass i {
    color: rgba(139, 92, 246, 0.8);
    font-size: 16px;
}

.search-box-glass input {
    background: transparent;
    border: none;
    color: #fff;
    outline: none;
    font-size: 14px;
    width: 100%;
}

.search-box-glass input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   User Info - Single Line Fix
   ============================================ */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.2s;
    min-width: 140px;
}

.user-info {
    display: flex;
    flex-direction: column;
    white-space: nowrap;
}

.user-info .name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.user-info .role {
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
}
