:root {
    /* iOS 26 Inspired Palette */
    --primary: #003366;
    --primary-gradient: #003366;
    --secondary: #5E5CE6;
    --success: #34C759;
    --danger: #FF3B30;
    --warning: #FF9500;
    --info: #5856D6;

    /* Backgrounds */
    --bg-body: #F2F2F7;
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-sidebar: #003366;
    /* Deep Blue Glass */
    --bg-input: rgba(118, 118, 128, 0.12);

    /* Text */
    --text-primary: #000000;
    --text-secondary: #8E8E93;
    --text-white: #FFFFFF;

    /* Effects */
    --blur: 20px;
    --radius-l: 24px;
    --radius-m: 16px;
    --radius-s: 10px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);

    /* Layout */
    --sidebar-width: 280px;
    --header-height: 70px;
    --mobile-tab-height: 74px;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.5;
    height: 100vh;
    display: flex;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: all 0.2s ease;
}

ul {
    list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

/* Layout Components */
.app-container {
    display: flex;
    width: 100%;
    height: 100%;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    color: var(--text-white);
    display: flex;
    flex-direction: column;
    padding: 2rem 1rem;
    position: relative;
    z-index: 100;
    box-shadow: var(--shadow-md);
    overflow-x: hidden;
}

.sidebar-header {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 3rem;
    padding: 0 1rem;
    background: linear-gradient(to right, #fff, #a5c9ff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.03em;
}

.nav-menu {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    scrollbar-width: thin;
}

.nav-item {
    margin-bottom: 0.2rem;
    /* Reduced from 0.5rem */
}

.nav-item a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    /* Reduced padding from 1rem 1.2rem */
    color: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-m);
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-size: 0.95rem;
    /* Slightly smaller text */
}

.nav-item a:hover,
.nav-item a.active {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-white);
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-item i {
    width: 24px;
    margin-right: 12px;
    font-size: 1.1rem;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    background: var(--bg-body);
}

.top-bar {
    height: var(--header-height);
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(242, 242, 247, 0.8);
    backdrop-filter: blur(var(--blur));
    position: sticky;
    top: 0;
    z-index: 90;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    box-shadow: var(--shadow-sm);
}

.user-menu span {
    display: grid;
    line-height: 1.15;
}

.user-menu small {
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 600;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
}

.content-wrapper {
    padding: 2rem;
    overflow-y: auto;
    height: calc(100vh - var(--header-height));
    display: flex;
    flex-direction: column;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.app-footer {
    margin-top: auto;
    padding: 2rem 0 1rem 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.app-footer strong {
    color: var(--primary);
    font-weight: 700;
}

/* Cards */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(var(--blur));
    border-radius: var(--radius-l);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.4);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: var(--radius-l);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-m);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    background: var(--primary-gradient);
}

.stat-info h3 {
    font-size: 2rem;
    margin: 0;
    font-weight: 800;
    background: var(--primary-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-info p {
    margin: 0;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-m);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 51, 102, 0.4);
}

.btn-secondary {
    background: rgba(118, 118, 128, 0.12);
    color: var(--primary);
}

.btn-secondary:hover {
    background: rgba(118, 118, 128, 0.2);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-m);
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    min-width: 720px;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    background: rgba(242, 242, 247, 0.5);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

td {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
    font-size: 0.95rem;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(0, 0, 0, 0.02);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 1rem;
    border-radius: var(--radius-m);
    border: 1px solid transparent;
    background: var(--bg-input);
    font-size: 1rem;
    transition: all 0.2s ease;
    font-family: inherit;
    min-height: 48px;
}

textarea {
    resize: vertical;
}

button,
.btn,
.nav-item a,
input,
select,
textarea {
    touch-action: manipulation;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

/* Login Page - Split Screen Layout */
.split-screen-container {
    display: flex;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* Left Side: Gradient Background + Floating Card */
.login-content-side {
    flex: 0 0 40%;
    min-width: 500px;
    background: linear-gradient(135deg, #f0f2f5 0%, #e1e5ea 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.login-content-side::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.4) 0%, rgba(0, 0, 0, 0) 50%);
    pointer-events: none;
}

/* Right Side: Full Image */
.login-image-side {
    flex: 1;
    background: url('../assets/ghms.jpg') center/cover no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 8%;
}

.login-image-side::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3); /* Subtle overall darken */
    z-index: 1;
}

.hero-overlay {
    position: relative;
    z-index: 20;
    color: white;
    max-width: 800px;
}

.hero-headline {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.04em;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hero-subheadline {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.95;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-divider {
    width: 60px;
    height: 4px;
    background: white;
    margin-bottom: 2rem;
    border-radius: 2px;
}

.hero-supporting-text {
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.7;
    opacity: 0.8;
    max-width: 600px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

@media (max-width: 1400px) {
    .hero-headline {
        font-size: 2.8rem;
    }
}

/* The Floating Card itself */
.auth-card {
    width: 100%;
    max-width: 900px;
    background: white;
    border-radius: 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    overflow: hidden;
    min-height: 550px;
}

/* Card Sections */
.auth-brand-section {
    flex: 0 0 40%;
    background: var(--primary-gradient);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
    position: relative;
}

.auth-brand-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><g fill="%23ffffff" fill-opacity="0.05" fill-rule="evenodd"><circle cx="3" cy="3" r="3"/><circle cx="13" cy="13" r="3"/></g></svg>');
    opacity: 0.3;
}

.auth-brand-section h1 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    color: white;
    line-height: 1.1;
}

.auth-brand-section p {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 500;
}

.auth-form-section {
    flex: 1;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-footer {
    position: absolute;
    bottom: 2rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
}

.auth-footer strong {
    color: var(--primary);
    font-weight: 700;
}

/* Responsive */
@media (max-width: 1200px) {
    .login-content-side {
        flex: 0 0 45%;
    }
}

@media (max-width: 992px) {
    .login-content-side {
        flex: 0 0 50%;
        min-width: auto;
    }

    .auth-card {
        flex-direction: column;
        min-height: auto;
    }

    .auth-brand-section {
        flex: 0 0 150px;
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .split-screen-container {
        flex-direction: column;
    }

    .login-content-side {
        flex: 1;
        width: 100%;
        background: url('../assets/ghms.jpg') center/cover no-repeat;
    }

    .login-content-side::before {
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(10px);
        width: 100%;
        height: 100%;
        position: absolute;
        inset: 0;
        z-index: 0;
    }

    .login-image-side {
        display: none;
    }

    .auth-card {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        position: relative;
        z-index: 1;
    }

    .auth-footer {
        z-index: 1;
    }
}

/* App Shell Responsiveness */
@media (max-width: 1180px) {
    :root {
        --sidebar-width: 88px;
    }

    .sidebar {
        padding: 1.25rem 0.75rem;
        align-items: center;
    }

    .sidebar-header {
        margin-bottom: 1.5rem;
        padding: 0;
    }

    .sidebar-header img {
        max-height: 42px !important;
    }

    .nav-menu {
        width: 100%;
        justify-content: flex-start;
    }

    .nav-item a {
        min-height: 52px;
        justify-content: center;
        padding: 0.85rem;
        font-size: 0;
        border-radius: 18px;
    }

    .nav-item i {
        width: auto;
        margin: 0;
        font-size: 1.25rem;
    }

    .content-wrapper {
        padding: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.55rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .top-bar {
        padding: 0 max(1rem, env(safe-area-inset-left)) 0 max(1rem, env(safe-area-inset-right));
    }

    .page-title {
        font-size: 1.2rem;
        margin: 0;
        max-width: 58vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .user-menu {
        gap: 0.6rem;
        padding: 0.4rem 0.65rem;
    }

    .user-menu span {
        display: none;
    }

    .card {
        padding: 1.25rem;
        border-radius: 18px;
        margin-bottom: 1rem;
    }

    .card:hover,
    .stat-card:hover,
    .btn-primary:hover {
        transform: none;
    }

    .card-header,
    .card > div[style*="justify-content: space-between"],
    .header-actions {
        align-items: flex-start !important;
        flex-direction: column;
        gap: 0.85rem;
    }

    .card > div[style*="justify-content: space-between"] .btn,
    .card-header .btn,
    .header-actions .btn,
    .header-actions > div {
        width: 100%;
    }

    .header-actions > div {
        display: grid;
        gap: 0.65rem;
    }

    .card > table,
    .content-wrapper table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: var(--radius-m);
    }

    th,
    td {
        padding: 0.85rem;
        white-space: nowrap;
    }

    .btn {
        min-height: 48px;
        padding: 0.8rem 1rem;
        border-radius: 14px;
    }

    .btn[title] {
        min-width: 48px;
        padding-inline: 0.85rem;
    }

    form[style*="display: flex"],
    .role-create-grid,
    .content-wrapper div[style*="grid-template-columns"] {
        display: flex !important;
        flex-direction: column;
    }

    form[style*="display: flex"] > *,
    .role-create-grid > *,
    .content-wrapper div[style*="grid-template-columns"] > * {
        width: 100% !important;
    }

    .mobile-stack-table,
    .mobile-stack-table tbody,
    .mobile-stack-table tr,
    .mobile-stack-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .mobile-stack-table {
        min-width: 0;
        overflow: visible;
    }

    .mobile-stack-table thead {
        display: none;
    }

    .mobile-stack-table tbody {
        display: grid;
        gap: 0.85rem;
    }

    .mobile-stack-table tr {
        padding: 0.95rem;
        border: 1px solid rgba(0, 0, 0, 0.06);
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.82);
        box-shadow: var(--shadow-sm);
    }

    .mobile-stack-table td {
        border: 0;
        padding: 0.45rem 0;
        white-space: normal;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        text-align: right;
        overflow-wrap: anywhere;
        overflow-wrap: anywhere;
    }

    .mobile-stack-table td::before {
        content: attr(data-label);
        flex: 0 0 auto;
        color: var(--text-secondary);
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        text-align: left;
    }

    .mobile-stack-table td:first-child {
        padding-top: 0;
        font-size: 1.05rem;
        font-weight: 700;
        color: var(--primary);
    }

    .mobile-stack-table td:last-child {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding-bottom: 0;
    }

    .mobile-stack-table td:last-child .btn {
        width: 100%;
        margin-top: 0.35rem;
    }

    .mobile-stack-table td:last-child::before,
    .mobile-stack-table td[colspan]::before {
        display: none;
    }
}

@media (max-width: 640px) {
    body {
        background: #f7f7fb;
    }

    .app-container {
        min-height: 100dvh;
    }

    .sidebar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        width: 100%;
        height: calc(var(--mobile-tab-height) + env(safe-area-inset-bottom));
        padding: 0.45rem max(0.55rem, env(safe-area-inset-right)) calc(0.45rem + env(safe-area-inset-bottom)) max(0.55rem, env(safe-area-inset-left));
        border-radius: 22px 22px 0 0;
        box-shadow: 0 -10px 30px rgba(0, 25, 51, 0.18);
        z-index: 200;
    }

    .sidebar-header {
        display: none;
    }

    .nav-menu {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 0.25rem;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }

    .nav-menu::-webkit-scrollbar {
        display: none;
    }

    .nav-item {
        flex: 0 0 72px;
        margin: 0;
        scroll-snap-align: center;
    }

    .nav-item a {
        min-height: 58px;
        padding: 0.45rem 0.3rem;
        flex-direction: column;
        gap: 0.25rem;
        font-size: 0.62rem;
        line-height: 1.1;
        text-align: center;
        border-radius: 16px;
    }

    .nav-item i {
        font-size: 1.05rem;
    }

    .main-content {
        width: 100%;
        min-width: 0;
    }

    .top-bar {
        height: calc(58px + env(safe-area-inset-top));
        padding-top: env(safe-area-inset-top);
        background: rgba(247, 247, 251, 0.92);
        border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    }

    .content-wrapper {
        height: calc(100dvh - 58px - var(--mobile-tab-height) - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        padding: 1rem 1rem calc(1.25rem + env(safe-area-inset-bottom));
    }

    .app-footer {
        padding-bottom: 0.5rem;
        font-size: 0.75rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .stat-card {
        padding: 1rem;
        gap: 1rem;
        border-radius: 18px;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
        flex: 0 0 50px;
    }

    .stat-info h3 {
        font-size: 1.55rem;
    }

    .stat-info p {
        font-size: 0.75rem;
    }

    .card > div[style*="display: flex"][style*="gap"] {
        flex-direction: column;
        align-items: stretch !important;
    }

    input,
    select,
    textarea {
        font-size: 16px;
        padding: 0.9rem;
        border-radius: 14px;
    }

    .badge {
        min-height: 28px;
    }

    .mobile-stack-table,
    .mobile-stack-table tbody,
    .mobile-stack-table tr,
    .mobile-stack-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .mobile-stack-table {
        min-width: 0;
        overflow: visible;
    }

    .mobile-stack-table thead {
        display: none;
    }

    .mobile-stack-table tbody {
        display: grid;
        gap: 0.85rem;
    }

    .mobile-stack-table tr {
        padding: 0.95rem;
        border: 1px solid rgba(0, 0, 0, 0.06);
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.82);
        box-shadow: var(--shadow-sm);
    }

    .mobile-stack-table td {
        border: 0;
        padding: 0.45rem 0;
        white-space: normal;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        text-align: right;
    }

    .mobile-stack-table td::before {
        content: attr(data-label);
        flex: 0 0 auto;
        color: var(--text-secondary);
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        text-align: left;
    }

    .mobile-stack-table td:first-child {
        padding-top: 0;
        font-size: 1.05rem;
        font-weight: 700;
        color: var(--primary);
    }

    .mobile-stack-table td:last-child {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding-bottom: 0;
    }

    .mobile-stack-table td:last-child .btn {
        width: 100%;
        margin-top: 0.35rem;
    }

    .mobile-stack-table td:last-child::before,
    .mobile-stack-table td[colspan]::before {
        display: none;
    }
}

@media (max-width: 430px) {
    .page-title {
        max-width: 52vw;
        font-size: 1.05rem;
    }

    .user-avatar {
        width: 30px;
        height: 30px;
    }

    .card {
        padding: 1rem;
        border-radius: 16px;
    }

    .nav-item {
        flex-basis: 66px;
    }
}

/* Login Mobile & Tablet Experience */
@media (max-width: 1180px) {
    .split-screen-container {
        min-height: 100dvh;
        height: auto;
        flex-direction: column;
    }

    .login-content-side {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
        min-height: 100dvh;
        background: url('../assets/ghms.jpg') center/cover no-repeat;
        padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
        box-shadow: none;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 1rem;
    }

    .auth-card {
        width: min(100%, 460px);
        max-width: 460px;
        border-radius: 24px;
        flex-direction: column;
        min-height: auto;
        margin: 0 auto;
        overflow: hidden;
    }

    .auth-brand-section {
        flex: 0 0 auto;
        min-height: 190px;
        padding: 2rem;
    }

    .auth-form-section {
        padding: 2rem;
    }

    .login-image-side {
        display: none;
    }

    .auth-footer {
        position: static;
        margin-top: 1rem;
        padding-inline: 1rem;
        width: min(100%, 460px);
        align-self: center;
        text-shadow: 0 1px 12px rgba(255, 255, 255, 0.9);
    }
}

@media (max-width: 520px) {
    .login-content-side {
        justify-content: flex-start;
        padding-top: max(1.25rem, env(safe-area-inset-top));
    }

    .auth-card {
        border-radius: 22px;
    }

    .auth-brand-section {
        flex-basis: auto;
        padding: 1.35rem;
        align-items: center;
        text-align: center;
        min-height: 170px;
    }

    .auth-brand-section img {
        max-width: 150px !important;
    }

    .auth-form-section {
        padding: 1.35rem;
    }

    .auth-form-section h2 {
        font-size: 1.45rem !important;
        margin-bottom: 1.25rem !important;
    }
}

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Badges */
.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.badge-success, .badge-confirmed, .badge-paid {
    background: rgba(52, 199, 89, 0.15);
    color: #248a3d;
}

.badge-warning, .badge-scheduled, .badge-pending {
    background: rgba(255, 149, 0, 0.15);
    color: #b36b00;
}

.badge-danger, .badge-cancelled, .badge-unpaid {
    background: rgba(255, 59, 48, 0.15);
    color: #cc2d24;
}

.badge-info {
    background: rgba(88, 86, 214, 0.15);
    color: #43419b;
}

/* Print Styles */
@media print {
    .no-print, 
    .sidebar, 
    .top-bar, 
    .auth-footer,
    .app-footer { 
        display: none !important; 
    }

    body {
        background: white !important;
        height: auto !important;
        overflow: visible !important;
    }

    .main-content {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        height: auto !important;
    }

    .content-wrapper {
        padding: 0 !important;
        overflow: visible !important;
        height: auto !important;
        display: block !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        margin: 0 0 2rem 0 !important;
        page-break-inside: avoid;
    }

    .table-container {
        overflow: visible !important;
    }

    table {
        border-collapse: collapse !important;
    }

    th, td {
        border: 1px solid #eee !important;
    }

    .tab-content {
        display: block !important;
    }

    /* Isolated Printing */
    body.printing-single .printable-section:not(.print-target) {
        display: none !important;
    }

    body.printing-single .tab-content:not(.print-target) {
        display: none !important;
    }

    .print-header-branded {
        display: none;
    }

    body.printing-single .print-header-branded,
    body.printing-all .print-header-branded {
        display: block !important;
        margin-bottom: 2rem;
        border-bottom: 2px solid var(--primary);
        padding-bottom: 1rem;
    }
}
