/* ==================== VARIABLES ==================== */
:root {
    --primary: #0066cc;
    --primary-dark: #0052a3;
    --primary-light: #1a7aff;
    --neutral-50: #fafbfc;
    --neutral-100: #f5f6f8;
    --neutral-200: #eaeef2;
    --neutral-300: #d9dfe7;
    --neutral-400: #8b95a7;
    --neutral-500: #6b7684;
    --neutral-600: #4a5568;
    --neutral-700: #2d3748;
    --neutral-900: #1a202c;
    --success: #1f8449;
    --warning: #f59e0b;
    --danger: #dc2626;
    --border-radius: 3px;
    --transition: all 0.2s ease;
}

/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: #ffffff;
    color: var(--neutral-700);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 64px;
    font-size: 14px;
}

/* ==================== HEADER ==================== */
header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--neutral-200);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    width: 100%;
}

header .navbar {
    background-color: transparent;
    padding: 0.75rem 0;
}

header .navbar-brand {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary) !important;
    letter-spacing: -0.3px;
    display: inline-flex !important;
    align-items: center !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: fit-content;
    flex-shrink: 0;
}

header .navbar-brand img {
    display: inline-block !important;
    height: 40px !important;
    width: auto !important;
    max-height: 40px !important;
    vertical-align: middle;
    transition: var(--transition);
}

header .navbar-brand img:hover {
    opacity: 0.85;
}

header .navbar-brand img.d-none {
    display: none !important;
}

header .navbar-brand img.d-md-none {
    display: none !important;
}

@media (min-width: 768px) {
    header .navbar-brand img.d-md-inline {
        display: inline-block !important;
    }
    
    header .navbar-brand img.d-md-none {
        display: none !important;
    }
}

/* ==================== NAVIGATION ==================== */
.nav-link {
    color: var(--neutral-600) !important;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    padding: 0.5rem 1rem !important;
}

.nav-link:hover {
    color: var(--primary) !important;
    background-color: transparent;
}

.nav-link.active {
    color: var(--primary) !important;
}

.nav-link.disabled {
    color: var(--neutral-400) !important;
    cursor: not-allowed;
    opacity: 0.5;
    pointer-events: none;
}

/* ==================== MAIN ==================== */
main {
    flex: 1;
    padding: 2rem 0;
    background-color: #ffffff;
}

main > .container {
    max-width: 1200px;
}

/* ==================== FOOTER ==================== */
footer {
    background-color: var(--neutral-100);
    color: var(--neutral-700);
    border-top: 1px solid var(--neutral-200);
    margin-top: auto;
    flex-shrink: 0;
    padding: 2.5rem 0 1rem;
}

footer a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ==================== BUTTONS ==================== */
.btn {
    border-radius: 3px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    border: 1px solid transparent;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
    text-decoration: none;
}

.btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

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

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

.btn-primary:active {
    background-color: #003d7a;
}

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

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

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

.btn-success:hover {
    background-color: #156b35;
    border-color: #156b35;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 0.8rem 2rem;
    font-size: 0.95rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==================== FORMS ==================== */
.form-control,
.form-select {
    border-radius: 3px;
    border: 1px solid var(--neutral-300);
    background-color: #ffffff;
    padding: 0.6rem 0.85rem;
    font-size: 0.9rem;
    transition: var(--transition);
    color: var(--neutral-700);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.1);
    outline: none;
    background-color: #ffffff;
}

.form-control::placeholder {
    color: var(--neutral-400);
}

.form-label {
    font-weight: 600;
    color: var(--neutral-700);
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.form-check-input {
    border-radius: 2px;
    border: 1px solid var(--neutral-300);
    cursor: pointer;
    width: 1rem;
    height: 1rem;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.1);
}

/* ==================== CARDS ==================== */
.card {
    border: 1px solid var(--neutral-200);
    border-radius: 3px;
    box-shadow: none;
    background-color: #ffffff;
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: var(--neutral-300);
}

.card-header {
    background-color: var(--neutral-100);
    border-bottom: 1px solid var(--neutral-200);
    padding: 1rem 1.2rem;
    font-weight: 600;
    color: var(--neutral-900);
    font-size: 0.95rem;
}

.card-body {
    padding: 1.5rem;
    color: var(--neutral-700);
}

.card-title {
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
}

.card-text {
    color: var(--neutral-600);
    font-size: 0.9rem;
}

/* ==================== ALERTS ==================== */
.alert {
    border-radius: 3px;
    border: 1px solid;
    padding: 0.9rem 1.1rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.alert-success {
    background-color: #f0f9f4;
    color: #155724;
    border-color: #d4f0db;
}

.alert-info {
    background-color: #f0f7ff;
    color: #0c4a6e;
    border-color: #d0e1f5;
}

.alert-warning {
    background-color: #fffbf0;
    color: #7f5a1f;
    border-color: #fde8bb;
}

.alert-danger {
    background-color: #fff5f5;
    color: #7f1d1d;
    border-color: #f5b7b1;
}

/* ==================== MODALS ==================== */
.modal-content {
    border-radius: 3px;
    border: 1px solid var(--neutral-200);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    background-color: #ffffff;
}

.modal-header {
    background-color: var(--neutral-100);
    border-bottom: 1px solid var(--neutral-200);
    padding: 1.25rem;
}

.modal-title {
    font-weight: 700;
    color: var(--neutral-900);
    font-size: 1.05rem;
}

.modal-body {
    padding: 1.5rem;
    color: var(--neutral-700);
}

.modal-footer {
    background-color: #ffffff;
    border-top: 1px solid var(--neutral-200);
    padding: 1rem 1.25rem;
}

.btn-close {
    opacity: 0.5;
    transition: var(--transition);
    width: 1.5rem;
    height: 1.5rem;
}

.btn-close:hover {
    opacity: 0.8;
}

/* ==================== TABS ==================== */
.nav-tabs {
    border-bottom: 1px solid var(--neutral-200);
    gap: 0;
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--neutral-600) !important;
    padding: 0.75rem 1.25rem !important;
    margin-bottom: -1px;
    font-weight: 600;
    font-size: 0.9rem;
    background-color: transparent;
}

.nav-tabs .nav-link:hover {
    border-bottom-color: var(--neutral-300);
    color: var(--primary) !important;
    background-color: transparent;
}

.nav-tabs .nav-link.active {
    border-bottom-color: var(--primary);
    color: var(--primary) !important;
    background-color: transparent;
    font-weight: 700;
}

.tab-content {
    color: var(--neutral-700);
    padding-top: 1rem;
}

/* ==================== HEADINGS ==================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 1rem;
    line-height: 1.3;
}

h1 {
    font-size: 2rem;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 1.6rem;
    letter-spacing: -0.3px;
}

h3 {
    font-size: 1.3rem;
}

h4 {
    font-size: 1.1rem;
}

h5 {
    font-size: 1rem;
}

h6 {
    font-size: 0.95rem;
}

.lead {
    font-size: 1.05rem;
    color: var(--neutral-600);
    font-weight: 500;
}

/* ==================== TEXT UTILITIES ==================== */
.text-muted {
    color: var(--neutral-500) !important;
}

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

.text-decoration-none {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.text-decoration-none:hover {
    color: var(--primary);
}

/* ==================== UTILITIES ==================== */
.bg-light {
    background-color: var(--neutral-100) !important;
    border-radius: 3px;
}

.bg-dark {
    background-color: var(--neutral-900) !important;
    color: white;
}

.bg-secondary {
    background-color: var(--neutral-500) !important;
    color: white;
}

.border-0 {
    border: none !important;
}

.fw-bold {
    font-weight: 700;
}

.small {
    font-size: 0.85rem;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

.mt-5 { margin-top: 3rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-3 { margin-top: 1rem !important; }

.p-3 { padding: 1rem !important; }
.p-5 { padding: 3rem !important; }

.px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }

.ps-4 { padding-left: 1.5rem !important; }

.ms-2 { margin-left: 0.5rem !important; }
.ms-auto { margin-left: auto !important; }

.w-100 {
    width: 100% !important;
}

.h-100 {
    height: 100% !important;
}

/* ==================== LIST GROUPS ==================== */
.list-group {
    border-radius: 3px;
    border: 1px solid var(--neutral-200);
    overflow: hidden;
}

.list-group-item {
    border: none;
    border-bottom: 1px solid var(--neutral-200);
    color: var(--neutral-700);
    padding: 0.9rem 1rem;
    transition: var(--transition);
    font-size: 0.9rem;
}

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

.list-group-item-action:hover,
.list-group-item-action:focus {
    background-color: var(--neutral-100);
    color: var(--primary);
}

/* ==================== IMAGES ==================== */
.img-fluid {
    max-width: 100%;
    height: auto;
    border-radius: 3px;
}

.rounded-start {
    border-radius: 3px 0 0 3px;
}

/* ==================== OFFCANVAS ==================== */
.offcanvas {
    background-color: #ffffff;
}

.offcanvas-header {
    background-color: var(--neutral-100);
    border-bottom: 1px solid var(--neutral-200);
}

.offcanvas-title {
    font-weight: 700;
    color: var(--neutral-900);
}

.offcanvas-body {
    padding: 1rem;
}

/* ==================== BADGES ==================== */
.badge {
    border-radius: 2px;
    padding: 0.35rem 0.65rem;
    font-weight: 600;
    font-size: 0.8rem;
}

.badge-primary {
    background-color: var(--primary);
    color: white;
}

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

/* ==================== DROPDOWN ==================== */
.dropdown-menu {
    border: 1px solid var(--neutral-200);
    border-radius: 3px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    padding: 0.5rem 0;
    background-color: #ffffff;
}

.dropdown-item {
    color: var(--neutral-700);
    transition: var(--transition);
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background-color: var(--neutral-100);
    color: var(--primary);
}

.dropdown-item.active {
    background-color: var(--primary);
    color: white;
}

.dropdown-divider {
    background-color: var(--neutral-200);
    margin: 0.4rem 0;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    body {
        padding-top: 56px;
        font-size: 13px;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    main {
        padding: 1rem 0;
    }

    .card-body {
        padding: 1rem;
    }

    .p-5 {
        padding: 1.5rem !important;
    }

    .card:hover {
        transform: none;
    }
}

@media (max-width: 576px) {
    body {
        font-size: 13px;
    }

    h1 {
        font-size: 1.3rem;
    }

    h2 {
        font-size: 1.1rem;
    }

    .container {
        padding: 0 1rem;
    }

    .btn {
        padding: 0.55rem 1rem;
        font-size: 0.85rem;
    }

    .btn-lg {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* ==================== UTILITY CLASSES ==================== */
.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

.d-flex {
    display: flex !important;
}

.flex-wrap {
    flex-wrap: wrap !important;
}

.gap-2 {
    gap: 0.5rem !important;
}

.g-0 {
    gap: 0 !important;
}

.g-2 {
    gap: 0.5rem !important;
}
