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

:root {
    /* Color Palette */
    --primary-color: #0F4C75;
    /* Deep Blue */
    --primary-hover: #3282B8;
    --accent-color: #BBE1FA;
    /* Soft Cyan/Blue */
    --text-color: #1B262C;
    --text-light: #6c757d;
    --bg-color: #F0F2F5;
    /* Light Gray/White */
    --white: #FFFFFF;
    --success: #28a745;
    --danger: #dc3545;

    /* Spacing & Borders */
    --border-radius: 12px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

    /* Typography */
    --font-family: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 6px rgba(15, 76, 117, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(15, 76, 117, 0.3);
}

/* Login Page Specifics */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.login-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.brand-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.brand-subtitle {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
    background: #f9f9f9;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(15, 76, 117, 0.1);
}

.error-msg {
    color: var(--danger);
    font-size: 0.85rem;
    margin-bottom: 15px;
    text-align: center;
    background: rgba(220, 53, 69, 0.1);
    padding: 10px;
    border-radius: 8px;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: var(--white);
    padding: 10px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.nav-tab:hover {
    background: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 76, 117, 0.15);
}

.nav-tab.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(15, 76, 117, 0.3);
    transform: translateY(-1px);
}

.nav-tab.active:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(15, 76, 117, 0.4);
}

.nav-tab svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.nav-tab:hover svg {
    transform: scale(1.1);
}

/* Dashboard Layout */
.dashboard-container {
    padding-bottom: 40px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-menu span {
    color: var(--text-light);
    font-weight: 500;
}

.text-center {
    text-align: center;
}

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

/* User Avatar */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    box-shadow: 0 2px 8px rgba(15, 76, 117, 0.2);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty-state-icon {
    background: var(--bg-color);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--text-light);
}

.empty-state h3 {
    margin-bottom: 12px;
    color: var(--primary-color);
    font-size: 1.25rem;
}

.empty-state p {
    color: var(--text-light);
    margin-bottom: 24px;
    max-width: 400px;
}

/* Breadcrumbs */
.breadcrumbs {
    margin-bottom: 20px;
    color: var(--text-light);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.breadcrumbs a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: var(--primary-color);
}

.breadcrumbs .separator {
    margin: 0 8px;
    color: #ccc;
}

.breadcrumbs .current {
    color: var(--text-color);
    font-weight: 500;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 12px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    min-width: 250px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toast-success { background-color: #28a745; }
.toast-danger { background-color: #dc3545; }
.toast-info { background-color: #17a2b8; }

.animate-slide-in {
    animation: slideInRight 0.3s ease forwards;
}

.animate-fade-out {
    animation: fadeOut 0.5s ease forwards;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* HTMX Indicator */
.htmx-indicator {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background-color: var(--primary-hover);
    z-index: 10000;
    transition: width 0.3s ease;
}

.htmx-request.htmx-indicator {
    width: 100%;
    animation: progressLoop 2s ease-in-out infinite;
}

@keyframes progressLoop {
    0% { left: -100%; width: 100%; }
    100% { left: 100%; width: 100%; }
}