/* assets/css/style.css - The Royal Imperial Marquee & Event Management ERP */

:root {
    --primary: #d97706;          /* Regal Gold */
    --primary-dark: #b45309;
    --primary-light: #fffbeb;
    --secondary: #0f172a;        /* Deep Midnight Sapphire */
    --secondary-light: #1e293b;
    
    --gold: #f59e0b;
    --gold-glow: rgba(245, 158, 11, 0.25);
    --emerald: #059669;
    --emerald-light: #ecfdf5;
    --rose: #e11d48;
    --rose-light: #fff1f2;
    --indigo: #4f46e5;
    --indigo-light: #eef2ff;
    --purple: #7c3aed;
    --purple-light: #f5f3ff;
    
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --border-gold: #fde68a;
    --text-main: #0f172a;
    --text-muted: #64748b;
    
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 16px 32px -4px rgba(15, 23, 42, 0.14);
    --shadow-gold: 0 8px 24px -4px rgba(217, 119, 6, 0.25);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Master Layout Structure */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Luxury Midnight & Gold Sidebar */
.app-sidebar {
    width: 260px;
    background: linear-gradient(180deg, #090d16 0%, #0f172a 60%, #1e293b 100%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-right: 1px solid rgba(245, 158, 11, 0.15);
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header {
    padding: 20px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}

.brand-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
    flex-shrink: 0;
}

.brand-text h2 {
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.brand-text span {
    font-size: 11px;
    color: #fde047;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.nav-section-title {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #94a3b8;
    padding: 10px 12px 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.nav-item i {
    font-size: 15px;
    width: 20px;
    text-align: center;
    color: #94a3b8;
    transition: var(--transition);
}

.nav-item:hover {
    background: rgba(245, 158, 11, 0.12);
    color: #fde047;
}

.nav-item:hover i {
    color: #f59e0b;
}

.nav-item.active {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.35);
}

.nav-item.active i {
    color: #ffffff;
}

.sidebar-footer {
    padding: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.2);
}

.user-profile-widget {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    flex: 1;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f59e0b;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
}

.user-info-text strong {
    font-size: 12px;
    display: block;
    color: #ffffff;
}

.user-info-text span {
    font-size: 10.5px;
    color: #cbd5e1;
}

/* App Main Container */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Top App Header */
.app-header {
    background: #ffffff;
    height: 68px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: var(--shadow-sm);
}

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

.mobile-toggle-btn {
    display: none;
    background: none;
    border: 1px solid var(--border);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 16px;
    cursor: pointer;
}

.header-page-title h1 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}

.header-page-title p {
    font-size: 11.5px;
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Command Palette Search Trigger Button */
.cmd-palette-trigger {
    background: #f8fafc;
    border: 1px solid var(--border);
    padding: 7px 14px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.cmd-palette-trigger:hover {
    border-color: var(--primary);
    color: var(--text-main);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.cmd-kbd {
    background: #e2e8f0;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 10.5px;
    font-weight: 800;
    color: #475569;
}

/* Page Body Container */
.app-body {
    flex: 1;
    padding: 24px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* Card System */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

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

.card-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body {
    padding: 20px;
}

/* Grid Layouts */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 24px; }

/* Luxury KPI Cards */
.kpi-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
}

.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.kpi-icon.gold { background: var(--primary-light); color: var(--primary); border: 1px solid var(--border-gold); }
.kpi-icon.emerald { background: var(--emerald-light); color: var(--emerald); border: 1px solid #a7f3d0; }
.kpi-icon.rose { background: var(--rose-light); color: var(--rose); border: 1px solid #fecdd3; }
.kpi-icon.indigo { background: var(--indigo-light); color: var(--indigo); border: 1px solid #c7d2fe; }
.kpi-icon.purple { background: var(--purple-light); color: var(--purple); border: 1px solid #ddd6fe; }

.kpi-info h4 {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.kpi-value {
    font-size: 22px;
    font-weight: 900;
    color: var(--text-main);
    line-height: 1.1;
}

.kpi-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Today's Shift Event Radar Bar */
.shift-radar-bar {
    background: linear-gradient(135deg, #090d16 0%, #1e293b 100%);
    color: #ffffff;
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid rgba(245, 158, 11, 0.3);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.shift-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 14px;
}

.shift-box {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

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

.table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
}

.table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
    vertical-align: middle;
}

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

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    text-transform: capitalize;
}

.badge-success, .badge-emerald { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.badge-warning, .badge-amber { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.badge-danger, .badge-rose { background: #ffe4e6; color: #9f1239; border: 1px solid #fecdd3; }
.badge-primary, .badge-gold { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.badge-indigo { background: #e0e7ff; color: #3730a3; border: 1px solid #c7d2fe; }
.badge-purple { background: #f3e8ff; color: #6b21a8; border: 1px solid #d8b4fe; }
.badge-secondary { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.badge-vip { background: linear-gradient(135deg, #f59e0b, #d97706); color: #ffffff; border: 1px solid #fde047; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid transparent;
}

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

.btn-secondary { background: #ffffff; color: var(--text-main); border-color: var(--border); }
.btn-secondary:hover { background: #f1f5f9; border-color: #cbd5e1; }

.btn-success { background: var(--emerald); color: #ffffff; }
.btn-success:hover { background: #047857; }

.btn-danger { background: var(--rose); color: #ffffff; }
.btn-danger:hover { background: #be123c; }

.btn-whatsapp { background: #25d366; color: #ffffff; }
.btn-whatsapp:hover { background: #128c7e; }

.btn-sm { padding: 6px 10px; font-size: 11.5px; }
.btn-lg { padding: 12px 20px; font-size: 14px; }

/* Form Controls */
.form-group {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 5px;
}

.form-label .req { color: var(--rose); }

.form-control, .form-select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-main);
    background: #ffffff;
    transition: var(--transition);
    outline: none;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.form-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

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

.alert-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.alert-error { background: #fff1f2; border: 1px solid #fecdd3; color: #9f1239; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

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

.modal-box {
    background: #ffffff;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    animation: modalIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

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

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    background: #f8fafc;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Command Palette Modal */
.cmd-modal-box {
    max-width: 620px;
    background: #ffffff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid #cbd5e1;
}

.cmd-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
}

.cmd-input-wrap i {
    font-size: 16px;
    color: var(--primary);
}

.cmd-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    outline: none;
    color: var(--text-main);
}

.cmd-list {
    max-height: 380px;
    overflow-y: auto;
    padding: 8px;
}

.cmd-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition);
}

.cmd-item:hover {
    background: #fef3c7;
    color: #92400e;
}

.cmd-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cmd-item-left i {
    color: var(--primary);
    width: 20px;
    text-align: center;
}

.cmd-tag {
    font-size: 10px;
    padding: 2px 6px;
    background: #e2e8f0;
    border-radius: 4px;
    color: #475569;
    font-weight: 700;
    text-transform: uppercase;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: 1fr; }
    .form-grid-4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .app-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: -260px;
        z-index: 1000;
    }
    .app-sidebar.show {
        left: 0;
    }
    .mobile-toggle-btn {
        display: block;
    }
    .grid-4, .grid-2, .form-grid-2, .form-grid-3, .form-grid-4, .shift-grid {
        grid-template-columns: 1fr;
    }
    .cmd-kbd, .btn-text-hide {
        display: none;
    }
}
