/* assets/css/style.css */
/* Premium Custom Design System for Tour Group Admin */

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

:root {
    --bg-primary: #090d16;
    --bg-secondary: #0f172a;
    --sidebar-bg: rgba(15, 23, 42, 0.7);
    --card-bg: rgba(30, 41, 59, 0.45);
    --card-hover: rgba(30, 41, 59, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(99, 102, 241, 0.4);
    
    --color-primary: #6366f1; /* Indigo */
    --color-primary-glow: rgba(99, 102, 241, 0.15);
    --color-secondary: #0ea5e9; /* Sky Blue */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #3b82f6;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dark: #64748b;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --glass-blur: blur(16px);
    --border-radius: 16px;
    --transition-speed: 0.3s;
}

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

body {
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(14, 165, 233, 0.12) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(15, 23, 42, 0.5) 0px, transparent 80%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.4);
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    transition: width var(--transition-speed);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
    text-decoration: none;
}

.brand-icon {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.brand-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    transition: all var(--transition-speed);
}

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

.nav-item a:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active a {
    color: white;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(14, 165, 233, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.3);
    box-shadow: inset 0 0 10px rgba(99, 102, 241, 0.1);
}

.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
}

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

.username {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.btn-logout {
    width: 100%;
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--color-danger);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all var(--transition-speed);
}

.btn-logout:hover {
    background: var(--color-danger);
    color: white;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

/* Main Content Area */
.main-wrapper {
    margin-left: 260px;
    flex-grow: 1;
    min-height: 100vh;
    padding: 2rem 3rem;
    transition: margin-left var(--transition-speed);
}

.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.page-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 2rem;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
    padding: 0.65rem 1.25rem;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    transition: all var(--transition-speed);
    font-family: var(--font-body);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: var(--color-danger);
    color: white;
}

.btn-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: var(--color-success);
    color: white;
}

/* Glass Cards */
.card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: border-color var(--transition-speed), transform var(--transition-speed);
}

.card:hover {
    border-color: var(--border-hover);
}

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

.stat-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.primary {
    background: rgba(99, 102, 241, 0.15);
    color: var(--color-primary);
}

.stat-icon.secondary {
    background: rgba(14, 165, 233, 0.15);
    color: var(--color-secondary);
}

.stat-icon.success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
}

.stat-icon.warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-warning);
}

.stat-details {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Charts Grid */
.grid-charts {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

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

.chart-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

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

.custom-table th {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.custom-table td {
    padding: 1.15rem 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    color: var(--text-main);
    font-size: 0.9rem;
}

.custom-table tr {
    transition: background-color var(--transition-speed);
}

.custom-table tr:hover td {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Badges */
.badge {
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.badge-new { background: rgba(99, 102, 241, 0.15); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.2); }
.badge-follow { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-done { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-converted { background: rgba(14, 165, 233, 0.15); color: #38bdf8; border: 1px solid rgba(14, 165, 233, 0.2); }
.badge-lost { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.2); }

.badge-active { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-completed { background: rgba(14, 165, 233, 0.15); color: #38bdf8; }
.badge-cancelled { background: rgba(239, 68, 68, 0.15); color: #f87171; }

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-speed);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 550px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform var(--transition-speed);
    max-height: 90vh;
    overflow-y: auto;
}

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

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

.modal-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.35rem;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    transition: color var(--transition-speed);
}

.modal-close:hover {
    color: white;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    color: white;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: all var(--transition-speed);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

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

/* Login Page Specific Styling */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #060913;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.2) 0%, transparent 45%),
        radial-gradient(circle at 90% 80%, rgba(14, 165, 233, 0.15) 0%, transparent 45%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    text-align: center;
}

.login-header {
    margin-bottom: 2rem;
}

.login-logo {
    margin: 0 auto 1.25rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.login-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.login-alert {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

/* Stepper (Applications Processing Progress) */
.stepper {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 2.5rem;
    padding-top: 1rem;
}

.stepper::before {
    content: '';
    position: absolute;
    top: 26px;
    left: 20px;
    right: 20px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1;
}

.step-line-progress {
    position: absolute;
    top: 26px;
    left: 20px;
    height: 3px;
    background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
    z-index: 2;
    transition: width 0.4s ease;
}

.step {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    text-align: center;
}

.step-node {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2.5px solid var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.step.active .step-node {
    border-color: var(--color-primary);
    color: white;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
    background: var(--color-primary);
}

.step.completed .step-node {
    border-color: var(--color-success);
    background: var(--color-success);
    color: white;
}

.step-label {
    margin-top: 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.3s ease;
    max-width: 90px;
}

.step.active .step-label,
.step.completed .step-label {
    color: white;
    font-weight: 600;
}

/* Detail cards style */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-list {
    list-style: none;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-muted);
}

.info-value {
    font-weight: 500;
    color: var(--text-main);
}

.info-value.bold {
    font-weight: 600;
}

/* Invoices Printable View */
.invoice-box {
    background: white;
    color: #333333;
    padding: 3rem;
    border-radius: 12px;
    max-width: 800px;
    margin: 0 auto;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 2px solid #eeeeee;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

.invoice-logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.75rem;
    color: #4f46e5;
}

.invoice-details {
    text-align: right;
}

.invoice-bill-to {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 3rem;
}

.invoice-table th {
    background: #f8fafc;
    padding: 0.75rem 1rem;
    font-weight: 600;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.invoice-table td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.invoice-summary {
    display: flex;
    justify-content: flex-end;
}

.invoice-summary-table {
    width: 250px;
    border-collapse: collapse;
}

.invoice-summary-table td {
    padding: 0.5rem 0;
}

.invoice-summary-table tr.total {
    font-weight: 700;
    font-size: 1.2rem;
    border-top: 2px solid #e2e8f0;
}

@media print {
    body {
        background: white !important;
        color: black !important;
    }
    .sidebar, .header-bar, .btn, .nav-menu {
        display: none !important;
    }
    .main-wrapper {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    .invoice-box {
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
}
