:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #0ea5e9;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --shadow: 0 1px 3px rgba(0, 0, 0, .1);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body, input, button { font-family: "Montserrat", sans-serif; }
body {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: var(--gray-700);
    font-size: 15px;
}
a { color: inherit; }
.hc_app_container { display: flex; flex-direction: column; min-height: 100vh; }
.hc_header {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}
.hc_logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.hc_logo_icon {
    background: linear-gradient(135deg, #4361ee, #7c3aed);
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.hc_logo_text h1 { font-size: 1.1rem; font-weight: 700; color: var(--gray-800); margin: 0; }
.hc_logo_text p { font-size: .65rem; color: var(--gray-500); margin: 0; }
.hc_header_actions { display: flex; align-items: center; gap: 12px; color: var(--gray-500); font-size: .75rem; }
.hc_logout {
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
    border-radius: 7px;
    padding: 7px 10px;
    text-decoration: none;
    background: white;
}
.hc_logout:hover { color: var(--danger); border-color: #fecaca; }
.hc_menu_toggle { display: none; background: none; border: 0; font-size: 24px; color: var(--gray-800); }
.menu-container { background: linear-gradient(135deg, #1e293b, #0f172a); border-bottom: 1px solid #334155; }
.menu-tabs { display: flex; gap: 5px; padding: 8px 20px; flex-wrap: wrap; justify-content: center; }
.menu-item { position: relative; display: inline-flex; }
.menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: .8rem;
    color: #e2e8f0;
    text-decoration: none;
    background: #334155;
    border: 1px solid #475569;
    transition: all .2s ease;
    cursor: pointer;
}
.menu-btn:hover, .menu-btn.active { background: #2563eb; color: white; transform: translateY(-1px); }
.menu-btn .arrow { font-size: 10px; margin-left: 4px; transition: transform .2s; }
.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #1e293b;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,.3);
    border: 1px solid #334155;
    min-width: 230px;
    z-index: 1000;
    display: none;
    margin-top: 4px;
    overflow: hidden;
}
.submenu.show { display: block; }
.submenu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    text-decoration: none;
    color: #cbd5e1;
    font-size: 12px;
    border-bottom: 1px solid #334155;
    transition: all .2s ease;
}
.submenu a:hover, .submenu a.active { background: #3b82f6; color: white; padding-left: 24px; }
.submenu a:last-child { border-bottom: 0; }
.mobile-menu-overlay, .mobile-menu-wrapper { display: none; }
.hc_main_content { flex: 1; padding: 20px 20px 70px; }
.hc_main_content_inner { max-width: 1400px; margin: 0 auto; }
.page-heading { margin-bottom: 18px; }
.page-heading h2 { margin: 0; color: var(--gray-800); font-size: 1.35rem; }
.page-heading p { margin: 4px 0 0; color: var(--gray-500); font-size: .8rem; }
.dashboard-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.dashboard-card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
    padding: 20px;
}
.dashboard-card-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dashboard-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}
.dashboard-card-icon.primary { background: linear-gradient(135deg, #4361ee, #7c3aed); }
.dashboard-card-icon.info { background: linear-gradient(135deg, #0ea5e9, #2563eb); }
.dashboard-card-icon.success { background: linear-gradient(135deg, #10b981, #059669); }
.dashboard-card-label { color: var(--gray-500); font-size: .75rem; font-weight: 600; text-transform: uppercase; }
.dashboard-card-value { color: var(--gray-800); font-size: 2rem; font-weight: 800; margin-top: 12px; }
.system-status {
    margin-top: 18px;
    background: white;
    border: 1px solid var(--gray-200);
    border-left: 4px solid var(--success);
    border-radius: 10px;
    padding: 16px 18px;
    box-shadow: var(--shadow);
}
.system-status strong { color: #065f46; }
.hc_footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #94a3b8;
    padding: 8px 20px;
    border-top: 1px solid #334155;
}
.hc_footer_content { max-width: 1400px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.hc_footer_copyright { font-size: .75rem; display: flex; align-items: center; gap: 8px; }
.hc_footer_copyright i { color: #3b82f6; }
.hc_back_to_top { background: #334155; border: 0; color: white; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; }
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(460px, 100%); background: white; border: 1px solid var(--gray-200); border-radius: 14px; box-shadow: var(--shadow-md); padding: 28px; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.auth-card h1 { margin: 0; color: var(--gray-800); font-size: 1.25rem; }
.auth-card p { color: var(--gray-500); font-size: .78rem; }
label { display: block; margin: 16px 0 7px; color: var(--gray-700); font-size: .78rem; font-weight: 600; }
input {
    width: 100%;
    border: 1px solid var(--gray-300);
    border-radius: 7px;
    padding: 11px 12px;
    color: var(--gray-800);
    background: white;
}
input:focus { outline: 2px solid #c7d2fe; border-color: var(--primary); }
.btn-primary {
    border: 0;
    border-radius: 7px;
    padding: 10px 18px;
    background: var(--primary);
    color: white;
    font-weight: 600;
    cursor: pointer;
}
.btn-primary:hover { background: var(--primary-dark); }
.auth-actions { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 20px; }
.muted { color: var(--gray-500); font-size: .72rem; }
.alert { margin: 15px 0; border-radius: 8px; padding: 11px 13px; background: #fee2e2; border: 1px solid #fecaca; color: #991b1b; font-size: .78rem; }

@media (max-width: 768px) {
    .hc_header_actions { display: none; }
    .hc_menu_toggle { display: block; }
    .menu-container { display: none; }
    .mobile-menu-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 1000; }
    .mobile-menu-overlay.show { display: block; }
    .mobile-menu-wrapper {
        position: fixed;
        top: 0;
        left: -290px;
        width: 280px;
        height: 100%;
        background: linear-gradient(135deg, #1e293b, #0f172a);
        z-index: 1001;
        transition: left .3s ease;
        overflow-y: auto;
        display: block;
        padding: 62px 14px 20px;
    }
    .mobile-menu-wrapper.open { left: 0; }
    .mobile-menu-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border: 0; border-radius: 8px; background: var(--danger); color: white; }
    .mobile-menu-tabs { display: flex; flex-direction: column; gap: 8px; }
    .mobile-menu-tabs .menu-item, .mobile-menu-tabs .menu-btn { width: 100%; }
    .mobile-menu-tabs .menu-btn { justify-content: flex-start; }
    .mobile-menu-tabs .submenu { position: relative; top: auto; width: 100%; margin: 5px 0; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .hc_main_content { padding: 14px 12px 65px; }
}
