:root {
    --jh-primary: #0056D2;
    --jh-accent: #00C8FF;
    --jh-secondary: #7E37EB;
    --jh-ink: #1F2937;
    --jh-surface: #F3F4F6;
    --jh-white: #FFFFFF;
}

html,
body {
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    color: var(--jh-ink);
}

h1,
h2,
h3,
h4,
h5,
h6,
.card-title,
.section-title,
.side-menu__label,
.dropdown-item {
    font-family: "Poppins", "Inter", Arial, sans-serif;
}

body {
    background-color: var(--jh-surface);
}

.app-header {
    background: var(--jh-white);
    border-bottom: 1px solid #e5e7eb;
}

.app-sidebar {
    background: linear-gradient(180deg, #1F2937 0%, #111827 100%);
}

.app-sidebar .side-menu__item {
    color: #dbe4f2;
}

.app-sidebar .side-menu__item .side-menu__label,
.app-sidebar .side-menu__item .side_menu_icon i {
    color: inherit !important;
}

.app-sidebar .side-menu__item:hover {
    background: rgba(0, 200, 255, 0.14);
    color: #ffffff;
}

.app-sidebar .side-menu__item.active {
    background: linear-gradient(135deg, var(--jh-primary) 0%, var(--jh-secondary) 100%);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(0, 86, 210, 0.35);
}

.btn-primary {
    background: linear-gradient(135deg, var(--jh-primary) 0%, var(--jh-accent) 100%);
    border-color: transparent;
}

.btn-primary:hover,
.btn-primary:focus {
    filter: brightness(0.97);
    border-color: transparent;
}

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

a {
    color: var(--jh-primary);
}

.jh-brand-logo {
    height: 38px;
    width: auto;
    display: block;
}

.jh-brand-logo--compact {
    height: 30px;
}

.jh-brand-mark {
    height: 34px;
    width: auto;
    display: block;
}

.footer {
    background: var(--jh-white);
    border-top: 1px solid #e5e7eb;
}

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

.app-container {
    padding: 1.25rem;
}

.nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 64px;
}

.header-left,
.header-right {
    min-width: 0;
}

.app-horizontal-logo a,
.app-sidebar-logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.app-sidebar-logo img,
.app-horizontal-logo img {
    max-width: 100%;
    height: auto;
}

.tenant-header-title {
    margin: 0;
    max-width: min(40vw, 340px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1rem;
    color: var(--jh-ink);
}

.app-sidebar .main-menu {
    padding-bottom: 1rem;
}

.card-header {
    gap: 0.5rem;
}

.table-responsive {
    -webkit-overflow-scrolling: touch;
}

.small-screen-sidebar {
    width: min(88vw, 320px) !important;
}

@media (max-width: 1199.98px) {
    .app-container {
        padding: 1rem;
    }

    .tenant-header-title {
        max-width: min(36vw, 260px);
    }
}

@media (max-width: 767.98px) {
    .app-container {
        padding: 0.75rem;
    }

    .nav-header {
        flex-wrap: wrap;
        row-gap: 0.35rem;
        min-height: 56px;
    }

    .header-left {
        flex: 1 1 auto;
    }

    .header-right {
        margin-left: auto;
    }

    .tenant-header-title {
        max-width: 48vw;
        font-size: 0.94rem;
    }

    .btn-sm {
        min-height: 36px;
    }

    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        float: none !important;
        text-align: left !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

@media (max-width: 575.98px) {
    .app-horizontal-logo .tenant-header-title {
        display: none;
    }
}
