/* Skyght Business - Modern Professional Theme */

:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #818cf8;
    --secondary: #0ea5e9;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e293b;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --sidebar-width: 260px;
    --navbar-height: 64px;
    --border-radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-800);
    padding-top: var(--navbar-height);
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

h1 { font-size: 1.875rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

/* Navbar */
/* Demo banner - pinned above navbar */
.demo-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    background: #f59e0b;
    color: #1e293b;
    text-align: center;
    padding: 6px 16px;
    font-size: 0.875rem;
}

.demo-active .navbar.fixed-top {
    top: 36px;
}

.demo-active .sidebar {
    top: calc(var(--navbar-height) + 36px);
    height: calc(100vh - var(--navbar-height) - 36px);
}

.demo-active main {
    padding-top: calc(var(--navbar-height) + 36px + 1rem) !important;
}

.navbar {
    height: var(--navbar-height);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    box-shadow: var(--shadow-md);
    border: none;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.navbar-brand::before {
    display: none;
}

.navbar .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.navbar .nav-link:hover {
    background: rgba(255,255,255,0.1);
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--navbar-height));
    background: white;
    border-right: 1px solid var(--gray-200);
    padding: 1.5rem 0;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-heading {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-400);
    padding: 0 1.5rem;
    margin-bottom: 0.75rem;
}

.sidebar .nav-link {
    color: var(--gray-600);
    padding: 0.65rem 1.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
}

.sidebar .nav-link:hover {
    color: var(--primary);
    background: var(--gray-50);
    border-left-color: var(--primary-light);
}

.sidebar .nav-link.active {
    color: var(--primary);
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.1) 0%, transparent 100%);
    border-left-color: var(--primary);
    font-weight: 600;
}

.sidebar .nav-link.text-warning {
    color: var(--warning) !important;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

/* Main Content */
main {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    min-height: calc(100vh - var(--navbar-height));
}

main.col-12 {
    margin-left: 0;
}

/* Cards */
.card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
}

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

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

/* Buttons */
.btn {
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    transition: all 0.15s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-dark) 100%);
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.4);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

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

/* Forms */
.form-control, .form-select {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--gray-300);
    font-size: 0.95rem;
    transition: all 0.15s ease;
}

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

.form-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Tables */
.table {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table thead th {
    background: var(--gray-50);
    border-bottom: 2px solid var(--gray-200);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-600);
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-100);
}

.table tbody tr:hover {
    background: var(--gray-50);
}

.table-responsive {
    border-radius: var(--border-radius);
    overflow: hidden;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
}

.badge.bg-warning {
    background: #fef3c7 !important;
    color: #92400e;
}

.badge.bg-success {
    background: #d1fae5 !important;
    color: #065f46;
}

.badge.bg-info {
    background: #dbeafe !important;
    color: #1e40af;
}

.badge.bg-secondary {
    background: var(--gray-200) !important;
    color: var(--gray-700);
}

.badge.bg-danger {
    background: #fee2e2 !important;
    color: #991b1b;
}

/* Alerts */
.alert {
    border-radius: var(--border-radius);
    border: none;
    padding: 1rem 1.25rem;
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #e0f2fe 100%);
    color: #1e40af;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #dcfce7 100%);
    color: #065f46;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fef2f2 100%);
    color: #991b1b;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%);
    color: #92400e;
}

/* Auth Pages */
.auth-container {
    min-height: calc(100vh - var(--navbar-height));
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
}

.auth-card {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
}

.auth-card .form-control {
    padding: 0.875rem 1rem;
}

.auth-card .btn-primary {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
}

/* Dashboard Stats */
.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
}

.stat-card.success { border-left-color: var(--success); }
.stat-card.warning { border-left-color: var(--warning); }
.stat-card.info { border-left-color: var(--secondary); }

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Chat/Message Bubbles */
.message-bubble {
    max-width: 75%;
    padding: 0.875rem 1.125rem;
    border-radius: 16px;
    margin-bottom: 0.75rem;
}

.message-bubble.inbound {
    background: var(--gray-100);
    border-bottom-left-radius: 4px;
}

.message-bubble.outbound {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-time {
    font-size: 0.7rem;
    opacity: 0.7;
}

/* Page Header */
.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.page-header h1 {
    margin-bottom: 0.25rem;
}

.page-header p {
    color: var(--gray-500);
    margin: 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--gray-500);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

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

    main {
        margin-left: 0;
        padding: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .auth-card {
        margin: 1rem;
        padding: 1.5rem;
    }

    .table thead th,
    .table tbody td {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card, .alert, .table {
    animation: fadeIn 0.3s ease;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}
