@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --hive-amber: #FFC107;
    --hive-amber-soft: #ffe082;
    --hive-amber-tint: #fff4c1;
    --hive-charcoal: #212121;
    --hive-charcoal-soft: #424242;
    --hive-cream: #FFF9E1;
    --hive-gray-bg: #F5F5F5;
    --hive-gray-100: #fafafa;
    --hive-gray-200: #eeeeee;
    --hive-gray-300: #e0e0e0;
    --hive-gray-500: #757575;
    --hive-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --hive-shadow-lg: 0 12px 32px rgba(33, 33, 33, 0.08);
    --hive-radius: 12px;
    --hive-radius-lg: 18px;
}

html {
    scroll-behavior: smooth;
}

body {
    background:
        radial-gradient(circle at top right, rgba(255, 193, 7, 0.10), transparent 22%),
        linear-gradient(180deg, #f8f8f8 0%, var(--hive-gray-bg) 100%);
    color: var(--hive-charcoal);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6,
.navbar-brand,
.btn,
.form-label,
.card-title,
.table thead th {
    font-family: 'Inter', system-ui, sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--hive-charcoal);
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.45rem, 1.15rem + 1vw, 2rem);
    margin-bottom: 1.25rem;
}

a {
    color: var(--hive-charcoal);
    text-decoration: none;
}

a:hover {
    color: #000;
}

small,
.text-muted {
    color: var(--hive-gray-500) !important;
}

.navbar {
    background: linear-gradient(90deg, #151515 0%, var(--hive-charcoal) 100%) !important;
    border-bottom: 1px solid rgba(255, 193, 7, 0.18);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

.navbar .navbar-brand {
    color: var(--hive-amber) !important;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 0.05em;
}

.navbar .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
    border-radius: 999px;
}

.navbar .btn-outline-light:hover {
    background: var(--hive-amber);
    border-color: var(--hive-amber);
    color: var(--hive-charcoal);
}

.container-fluid {
    width: 100%;
}

.container-fluid > .row {
    min-height: calc(100vh - 72px);
}

.container-fluid > .row > [class*='col-md-10'],
.container-fluid > .row > [class*='col-md-2'] {
    transition: all 0.25s ease;
}

.bg-light.border-end.p-3 {
    background: linear-gradient(180deg, #1f1f1f 0%, #2b2b2b 100%) !important;
    border-right: none !important;
    box-shadow: inset -1px 0 0 rgba(255, 193, 7, 0.12);
    padding: 1.25rem !important;
}

.bg-light.border-end.p-3::before {
    content: 'HIVE ERP';
    display: block;
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.08em;
    font-size: 0.9rem;
    padding: 0.4rem 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav.flex-column {
    gap: 0.35rem;
}

.nav-item {
    margin-bottom: 0 !important;
}

.nav-link {
    position: relative;
    color: rgba(255, 255, 255, 0.86) !important;
    font-weight: 600;
    padding: 0.9rem 1rem 0.9rem 2.7rem;
    border-radius: 12px;
    transition: all 0.2s ease;
    min-height: 48px;
    display: flex;
    align-items: center;
    background: transparent;
}

.nav-link::before {
    content: '⬢';
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--hive-amber);
    opacity: 0.95;
}

.nav-link:hover,
.nav-link:focus {
    background: linear-gradient(90deg, rgba(255, 193, 7, 0.18), rgba(255, 193, 7, 0.08));
    color: #fff !important;
    transform: translateX(2px);
}

.p-4 {
    padding: clamp(1rem, 0.8rem + 1vw, 2rem) !important;
}

.card {
    border: 1px solid rgba(33, 33, 33, 0.05);
    border-radius: var(--hive-radius-lg);
    box-shadow: var(--hive-shadow);
    background: rgba(255, 255, 255, 0.98);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--hive-shadow-lg);
}

.card .card-body {
    padding: 1.25rem;
}

.shadow-sm {
    box-shadow: var(--hive-shadow) !important;
}

.alert {
    border: none;
    border-radius: var(--hive-radius);
    box-shadow: var(--hive-shadow);
}

.form-label {
    color: var(--hive-charcoal);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border-radius: 12px;
    border: 1px solid #e4e4e4;
    min-height: 48px;
    padding: 0.72rem 0.9rem;
    color: var(--hive-charcoal);
    background-color: #fff;
    box-shadow: none;
}

textarea.form-control {
    min-height: 110px;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(255, 193, 7, 0.9);
    box-shadow: 0 0 0 0.22rem rgba(255, 193, 7, 0.16);
}

.btn {
    border-radius: 12px;
    min-height: 44px;
    padding: 0.68rem 1rem;
    font-weight: 700;
    border-width: 1px;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary,
.btn-warning {
    background: var(--hive-amber);
    border-color: var(--hive-amber);
    color: var(--hive-charcoal);
    box-shadow: 0 10px 20px rgba(255, 193, 7, 0.22);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-warning:hover,
.btn-warning:focus {
    background: #ffca28;
    border-color: #ffca28;
    color: #111;
}

.btn-secondary,
.btn-dark {
    background: transparent;
    color: var(--hive-charcoal);
    border-color: rgba(33, 33, 33, 0.18);
}

.btn-secondary:hover,
.btn-dark:hover,
.btn-secondary:focus,
.btn-dark:focus {
    background: var(--hive-charcoal);
    border-color: var(--hive-charcoal);
    color: #fff;
}

.btn-info {
    background: var(--hive-charcoal);
    border-color: var(--hive-charcoal);
    color: #fff !important;
}

.btn-info:hover,
.btn-info:focus {
    background: #111;
    border-color: #111;
}

.btn-sm {
    min-height: 36px;
    padding: 0.42rem 0.8rem;
    border-radius: 10px;
}

.table-responsive {
    border-radius: 14px;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: #fffdf4;
    --bs-table-hover-bg: #fff7d9;
    margin-bottom: 0;
    vertical-align: middle;
}

.table thead th {
    background: var(--hive-cream) !important;
    color: var(--hive-charcoal);
    border-bottom: 1px solid #f1deb0;
    border-top: none;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 1rem 0.9rem;
    white-space: nowrap;
}

.table tbody tr {
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.table tbody tr:nth-child(even) {
    background: rgba(255, 249, 225, 0.62);
}

.table tbody tr:hover {
    background: #fff7d9;
}

.table > :not(caption) > * > * {
    padding: 0.95rem 0.9rem;
    border-color: #ededed;
}

.badge {
    border-radius: 999px;
    padding: 0.48rem 0.72rem;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.bg-success,
.bg-primary,
.bg-info,
.bg-warning,
.bg-danger,
.bg-secondary {
    color: #111 !important;
}

.progress {
    border-radius: 999px;
    background: #f1f1f1;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--hive-amber), #ffd95e);
    color: var(--hive-charcoal);
    font-weight: 700;
}

.list-group-item {
    border-color: rgba(0, 0, 0, 0.05);
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
}

hr {
    border-color: rgba(33, 33, 33, 0.08);
    opacity: 1;
}

.table-bordered > :not(caption) > * {
    border-width: 0 0 1px 0;
}

.table-bordered > :not(caption) > * > * {
    border-width: 0;
}

.card .table-responsive,
.card table {
    border-radius: 12px;
}

/* Dashboard stat cards */
.row.g-3.mb-4 .card .card-body,
.row.g-4 .card .card-body {
    height: 100%;
}

.row.g-3.mb-4 .card h6 {
    color: var(--hive-gray-500);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.row.g-3.mb-4 .card h3 {
    font-size: clamp(1.55rem, 1.2rem + 0.8vw, 2rem);
    margin: 0;
}

/* Better spacing for action groups */
.d-flex.justify-content-between.align-items-center.mb-3,
.d-flex.justify-content-between.align-items-center.mb-4 {
    gap: 1rem;
    flex-wrap: wrap;
}

/* Improve flash messages and text-heavy sections */
.card p:last-child,
.card ul:last-child,
.card ol:last-child {
    margin-bottom: 0;
}

/* Hospitality warmth accents */
.card::after {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, rgba(255, 193, 7, 0.95), rgba(255, 193, 7, 0));
    opacity: 0.45;
}

/* Responsive layout */
@media (min-width: 768px) {
    .container-fluid > .row > .col-md-2 {
        position: sticky;
        top: 72px;
        align-self: flex-start;
        min-height: calc(100vh - 72px);
    }

    .bg-light.border-end.p-3 {
        min-height: calc(100vh - 72px) !important;
    }
}

@media (max-width: 991.98px) {
    .navbar .container-fluid {
        align-items: flex-start;
        gap: 0.75rem;
    }

    .navbar .d-flex.ms-auto.text-white {
        margin-left: 0 !important;
        width: 100%;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
}

@media (max-width: 767.98px) {
    .container-fluid > .row {
        min-height: auto;
    }

    .bg-light.border-end.p-3 {
        min-height: auto !important;
        padding: 0.9rem !important;
        border-radius: 0 0 18px 18px;
    }

    .bg-light.border-end.p-3::before {
        padding-bottom: 0.8rem;
        margin-bottom: 0.8rem;
    }

    .nav.flex-column {
        flex-direction: row !important;
        overflow-x: auto;
        gap: 0.6rem;
        padding-bottom: 0.15rem;
        scrollbar-width: thin;
    }

    .nav.flex-column::-webkit-scrollbar {
        height: 6px;
    }

    .nav.flex-column::-webkit-scrollbar-thumb {
        background: rgba(255, 193, 7, 0.45);
        border-radius: 999px;
    }

    .nav-link {
        white-space: nowrap;
        min-width: max-content;
        padding: 0.8rem 1rem 0.8rem 2.35rem;
    }

    .col-md-10.p-4,
    .p-4 {
        padding: 1rem !important;
    }

    .card .card-body {
        padding: 1rem;
    }

    .table thead th,
    .table > :not(caption) > * > * {
        padding: 0.82rem 0.72rem;
    }

    .btn,
    .form-control,
    .form-select {
        min-height: 46px;
    }

    .d-flex.justify-content-between.align-items-center.mb-3 > div,
    .d-flex.justify-content-between.align-items-center.mb-4 > div {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0.65rem;
    }
}