@charset "UTF-8";

@import url('dashboard.css');
@import url('legacy.css');

/* =========================================
   1. Variables & Global Reset
   ========================================= */
:root {
    /* Stitch Design Theme: Soothing Slate/Teal */
    --primary-color: #477a8a;
    /* Soft Muted Teal */
    --primary-hover: #3a6471;
    --secondary-bg: #f8fafc;
    /* Slate-50 */
    --border-color: #e2e8f0;
    /* Slate-200 */
    --text-color: #334155;
    /* Slate-700 */
    --text-muted: #64748b;
    /* Slate-500 */

    /* Bootstrap 5 Overrides */
    --bs-primary: #477a8a;
    --bs-primary-rgb: 71, 122, 138;
    --bs-body-bg: #f8fafc;
    --bs-body-color: #334155;
    --bs-link-color: #477a8a;
    --bs-link-hover-color: #3a6471;

    /* Navbar Background: Dark Slate from Stitch */
    --navbar-bg: #1e293b;
    /* Slate-800 */

    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --input-focus-shadow: 0 0 0 0.25rem rgba(71, 122, 138, 0.25);

    --border-radius-base: 0.75rem;
    /* Rounded-xl */
}

body {
    font-family: 'Inter', "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.95rem;
    background-color: var(--secondary-bg);
    color: var(--text-color);
    line-height: 1.6;
}

/* =========================================
   2. Navbar Customizations (Updated for LIGHTSTAR)
   ========================================= */
.bg-dark-modern {
    background-color: var(--navbar-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* New Brand Icon Style */
.brand-icon {
    color: var(--primary-color);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
}

.brand-text {
    letter-spacing: -0.5px;
    font-size: 1.25rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    font-size: 0.9rem;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    color: rgba(255, 255, 255, 0.75) !important;
    transition: color 0.2s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #fff !important;
}

.navbar-nav .nav-link.active {
    position: relative;
}

/* Underline active link only on Desktop (xl and up) */
@media (min-width: 1200px) {
    .navbar-nav .nav-link.active::after {
        content: '';
        position: absolute;
        bottom: 5px;
        left: 1rem;
        right: 1rem;
        height: 2px;
        background-color: var(--primary-color);
        border-radius: 2px;
    }
}

/* Mobile Menu Adjustments */
@media (max-width: 1199.98px) {
    .navbar-collapse {
        background-color: var(--navbar-bg);
        padding: 1rem;
        border-radius: 0 0 0.5rem 0.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        margin-top: 0.5rem;
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 0 !important;
    }

    .dropdown-menu {
        background-color: rgba(255, 255, 255, 0.05);
        border: none;
    }

    .dropdown-item {
        color: #ddd;
    }

    .dropdown-item:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: #fff;
    }
}

/* Dropdown Animation */
.animate-slide {
    animation: slideIn 0.2s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* =========================================
   3. Content & Typography
   ========================================= */
a {
    text-decoration: none;
    color: var(--primary-color);
    transition: 0.2s;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: #343a40;
}

/* =========================================
   4. Forms (Modern Bootstrap-compatible)
   ========================================= */
.form-control,
.form-select {
    height: 2.5rem;
    font-size: 0.95rem;
    border-radius: var(--border-radius-base);
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.form-control:focus,
.form-select:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: var(--input-focus-shadow);
}

textarea.form-control {
    height: auto;
}

/* =========================================
   5. Modern Cards & Tables
   ========================================= */
.card {
    border-radius: 1rem;
    /* Rounded-2xl for cards */
    transition: box-shadow 0.2s ease;
    box-shadow: var(--card-shadow);
}

.card.hover-shadow:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1) !important;
}

.table>thead {
    border-bottom: 2px solid var(--border-color);
}

.table>tbody>tr:hover {
    background-color: rgba(13, 110, 253, 0.04);
}

/* =========================================
   6. Page Header Pattern
   ========================================= */
.page-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

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

.page-header .text-muted {
    font-size: 0.875rem;
}

/* =========================================
   7. Utilities
   ========================================= */
.add-margin-bottom {
    margin-bottom: 2rem !important;
}

#add_space {
    padding-top: 2rem;
}

/* Datepicker Fixes */
.ui-datepicker {
    border-radius: 0.375rem;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
}

.ui-datepicker-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    color: #343a40;
}

.ui-datepicker-header .ui-icon {
    background-image: url("images/ui-icons_222222_256x240.png");
}

.ui-datepicker .ui-datepicker-title,
.ui-datepicker .ui-datepicker-title select {
    color: #343a40;
}

.ui-datepicker .ui-datepicker-title select {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.1rem 0.35rem;
}

/* =========================================
   8. Action Buttons in Table
   ========================================= */
.btn-action-group {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* =========================================
   9. Badge Styles
   ========================================= */
.badge-status {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* =========================================
   10. Content Wrapper (Standard Layout)
   ========================================= */
.content-wrapper {
    min-height: calc(100vh - 200px);
}

/* Card-free layout for pages that manage their own cards */
.content-wrapper.no-card {
    background: transparent;
}

.content-wrapper.no-card>.card {
    border: none;
    box-shadow: none;
    background: transparent;
}

.content-wrapper.no-card>.card>.card-body {
    padding: 0;
}

/* =========================================
   11. Stitch Design Overrides (Buttons & Badges)
   ========================================= */
.btn {
    border-radius: var(--border-radius-base);
    font-weight: 600;
}

.btn-primary {
    --bs-btn-bg: var(--primary-color);
    --bs-btn-border-color: var(--primary-color);
    --bs-btn-hover-bg: #365c69;
    --bs-btn-hover-border-color: #365c69;
    --bs-btn-active-bg: #365c69;
    --bs-btn-active-border-color: #365c69;
    --bs-btn-disabled-bg: var(--primary-color);
    --bs-btn-disabled-border-color: var(--primary-color);
}

.btn-outline-primary {
    --bs-btn-color: var(--primary-color);
    --bs-btn-border-color: var(--primary-color);
    --bs-btn-hover-bg: var(--primary-color);
    --bs-btn-hover-border-color: var(--primary-color);
    --bs-btn-active-bg: var(--primary-color);
    --bs-btn-active-border-color: var(--primary-color);
    --bs-btn-disabled-color: var(--primary-color);
    --bs-btn-disabled-border-color: var(--primary-color);
}

.text-primary {
    color: var(--primary-color) !important;
}

.badge {
    border-radius: 9999px;
    /* Rounded-full */
    padding: 0.35em 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.7rem;
}

.btn-surface {
    background-color: #fff;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    /* Soft shadow */
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-surface:hover {
    background-color: var(--secondary-bg);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Nav Pills Custom */
.nav-pills .nav-link {
    background-color: #fff;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 500;
}

.nav-pills .nav-link.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* Red Surface Button for Destructive Actions */
.btn-surface-danger:hover {
    color: #dc3545 !important;
    border-color: #dc3545 !important;
    background-color: #fff5f5 !important;
}
