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

:root {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --text-light: #f1f5f9;
    --sidebar-bg: #1e1b4b; /* Deep Indigo Dark */
    --sidebar-hover: #312e81;
    --sidebar-active: #4f46e5;
    --border-color: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --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);
    --radius: 12px;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-dark);
    font-size: 0.95rem;
    overflow-x: hidden;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Typography & Links */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--text-dark);
}
a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}
a:hover {
    color: var(--primary-hover);
}

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

.main-content {
    flex-grow: 1;
    padding: 2rem;
    transition: all 0.3s ease;
    width: 100%;
}

/* Navbar */
.navbar-custom {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    box-shadow: var(--shadow-sm);
    z-index: 1000;
}
.navbar-custom .navbar-brand {
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.navbar-custom .user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Sidebar styling */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: var(--text-light);
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 20px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    z-index: 1010;
}
.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.15rem;
    color: #ffffff;
}
.sidebar-logo img {
    height: 32px;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
}
.sidebar-menu {
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex-grow: 1;
}
.sidebar-menu a {
    color: rgba(255,255,255,0.7);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}
.sidebar-menu a i {
    font-size: 1.15rem;
}
.sidebar-menu a:hover {
    background-color: var(--sidebar-hover);
    color: #ffffff;
}
.sidebar-menu a.active {
    background-color: var(--sidebar-active);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Premium Card Panels */
.card-custom {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 1.5rem;
    overflow: hidden;
}
.card-custom:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.card-custom .card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-custom .card-body {
    padding: 1.5rem;
}

/* Form Inputs */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 0.6rem 0.9rem;
    font-size: 0.95rem;
    color: var(--text-dark);
    background-color: #ffffff;
    transition: all 0.2s ease;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
    outline: 0;
}
.form-label {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
}

/* Buttons */
.btn-custom {
    font-weight: 500;
    border-radius: 8px;
    padding: 0.55rem 1.25rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-primary-custom {
    background-color: var(--primary);
    border: 1px solid var(--primary);
    color: #ffffff;
}
.btn-primary-custom:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}
.btn-secondary-custom {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
}
.btn-secondary-custom:hover {
    background-color: #f1f5f9;
    color: var(--text-dark);
}

/* Tables */
.table-responsive-custom {
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    background-color: #ffffff;
    box-shadow: var(--shadow-sm);
}
.table-custom {
    margin-bottom: 0;
}
.table-custom th {
    background-color: #f8fafc;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}
.table-custom td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
}
.table-custom tr:last-child td {
    border-bottom: none;
}

/* Stats Widgets */
.stat-card {
    border-radius: var(--radius);
    padding: 1.5rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.stat-info {
    display: flex;
    flex-direction: column;
}
.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}
.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}

/* Customized Status Badges */
.badge-custom {
    padding: 0.4rem 0.75rem;
    font-weight: 600;
    font-size: 0.8rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid transparent;
}
.badge-custom::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.badge-pending {
    background-color: #fef3c7;
    color: #d97706;
}
.badge-pending::before { background-color: #d97706; }

.badge-in_progress {
    background-color: #e0f2fe;
    color: #0284c7;
}
.badge-in_progress::before { background-color: #0284c7; }

.badge-completed {
    background-color: #d1fae5;
    color: #059669;
}
.badge-completed::before { background-color: #059669; }

/* Tabs Wizard styling */
.nav-pills-custom {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    gap: 1rem;
}
.nav-pills-custom .nav-link {
    color: var(--text-muted);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: transparent;
    border: none;
    transition: all 0.2s ease;
}
.nav-pills-custom .nav-link.active {
    color: var(--primary);
    background-color: var(--primary-light);
    font-weight: 600;
}
.tab-pane-custom {
    display: none;
}
.tab-pane-custom.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Glassmorphic Login screen */
.login-bg {
    background: radial-gradient(circle at 10% 20%, rgb(87, 108, 117) 0%, rgb(37, 50, 55) 100.2%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.login-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    animation: fadeIn 0.4s ease;
}

/* Hamburger & Responsive Drawer */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1005;
    transition: all 0.3s ease;
}
.sidebar-overlay.open {
    display: block;
}

.hamburger-btn {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}

@media (max-width: 768px) {
    .layout-wrapper {
        flex-direction: column;
    }
    .hamburger-btn {
        display: block;
    }
    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: -260px;
        z-index: 1020;
    }
    .sidebar.open {
        left: 0;
    }
    .main-content {
        padding: 1.25rem;
    }
    .stat-card {
        padding: 1.25rem;
    }
}

/* Voice Mic Animation */
@keyframes micPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}
.pulse-mic {
    animation: micPulse 1.5s infinite;
}

/* Custom AJAX Improvements styles */
/* Loading Progress Bar */
#ajax-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background-color: var(--primary);
    z-index: 9999;
    width: 0;
    transition: width 0.2s ease, opacity 0.2s ease;
    opacity: 0;
}

/* Fade out animation for deleting rows */
.fade-out {
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Inline feedback helper */
.invalid-feedback {
    display: none;
    font-size: 0.825rem;
    color: var(--danger);
    margin-top: 0.25rem;
}
.is-invalid ~ .invalid-feedback {
    display: block;
}

/* Spinner for button */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

