html {
    font-size: 14px;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 15px;
    }
}

body {
    margin: 0;
    min-height: 100vh;
    background: #f4f7fb;
    color: #1f2937;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* ===== APP LAYOUT ===== */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #1f2a37 0%, #243447 100%);
    color: #fff;
    padding: 22px 18px;
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.12);
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 26px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #325d53;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: #fff;
    box-shadow: 0 8px 18px rgba(50, 93, 83, 0.35);
}

.brand-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.1;
}

.brand-subtitle {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.68);
    margin-top: 2px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-section {
    margin-top: 18px;
    margin-bottom: 6px;
    padding: 8px 12px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.52);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,0.92);
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 14px;
    transition: all 0.2s ease;
    font-weight: 500;
}

    .nav-item:hover {
        background: rgba(255,255,255,0.08);
        color: #fff;
        transform: translateX(2px);
    }

.nav-icon {
    width: 22px;
    text-align: center;
    font-size: 1rem;
    opacity: 0.95;
}

/* ===== MAIN AREA ===== */
.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    height: 72px;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.topbar-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #eef2f7;
    color: #111827;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.92rem;
    font-weight: 600;
}

.user-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #22c55e;
}

.logout-form {
    margin: 0;
}

.content-area {
    padding: 28px;
}

.content-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    min-height: calc(100vh - 160px);
}

.app-footer {
    padding: 18px 28px 26px 28px;
    color: #6b7280;
    font-size: 0.9rem;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5 {
    color: #0f172a;
    font-weight: 700;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.1rem;
    letter-spacing: -0.02em;
}

/* ===== BUTTONS ===== */
.btn {
    border-radius: 12px;
    font-weight: 600;
    padding: 0.58rem 1rem;
    box-shadow: none !important;
}

.btn-primary {
    background: #325d53;
    border-color: #325d53;
}

    .btn-primary:hover,
    .btn-primary:focus {
        background: #284a42;
        border-color: #284a42;
    }

.btn-success {
    background: #1f8f5f;
    border-color: #1f8f5f;
}

.btn-danger {
    background: #d14343;
    border-color: #d14343;
}

.btn-dark {
    background: #111827;
    border-color: #111827;
}

.btn-ghost {
    background: #eef2f7;
    color: #111827;
    border: 1px solid #dde3eb;
}

    .btn-ghost:hover {
        background: #e3eaf3;
        color: #0f172a;
    }

/* ===== TABLES ===== */
.table {
    --bs-table-bg: transparent;
    vertical-align: middle;
}

    .table thead th {
        border-bottom: 1px solid #e5e7eb;
        color: #0f172a;
        font-weight: 700;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .table tbody td {
        padding-top: 1rem;
        padding-bottom: 1rem;
        border-color: #edf2f7;
    }

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background: #f8fafc;
}

/* ===== CARDS / ALERTS / BADGES ===== */
.card {
    border: 1px solid #edf2f7;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.card-body {
    padding: 1.35rem;
}

.alert {
    border: none;
    border-radius: 16px;
    padding: 1rem 1.1rem;
}

.badge {
    border-radius: 999px;
    padding: 0.5em 0.75em;
    font-weight: 700;
    font-size: 0.78rem;
}

/* ===== FORMS ===== */
.form-control,
.form-select {
    border-radius: 14px;
    border: 1px solid #d9e1ea;
    padding: 0.75rem 0.95rem;
    box-shadow: none !important;
}

    .form-control:focus,
    .form-select:focus {
        border-color: #325d53;
        box-shadow: 0 0 0 0.18rem rgba(50, 93, 83, 0.14) !important;
    }

textarea.form-control {
    min-height: 120px;
}

.form-label {
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.form-text {
    color: #6b7280;
}

/* ===== LINKS ===== */
a {
    color: #325d53;
}

    a:hover {
        color: #284a42;
    }

/* ===== CALENDAR / SPECIAL BLOCKS ===== */
#calendar {
    background: #fff;
    border-radius: 18px;
    padding: 10px;
}

/* ===== MOBILE ===== */
@media (max-width: 991px) {
    .sidebar {
        width: 90px;
        padding: 18px 10px;
    }

    .brand-title,
    .brand-subtitle,
    .nav-item span:not(.nav-icon),
    .nav-section {
        display: none;
    }

    .sidebar-brand {
        justify-content: center;
    }

    .nav-item {
        justify-content: center;
        padding: 12px;
    }

    .topbar {
        padding: 0 16px;
    }

    .content-area {
        padding: 16px;
    }

    .content-card {
        padding: 18px;
        border-radius: 18px;
    }
    .auth-wrap {
        min-height: 70vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .auth-card {
        width: 100%;
        max-width: 520px;
        background: #fff;
        border-radius: 22px;
        padding: 32px;
        box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
        border: 1px solid #edf2f7;
    }

    .auth-header {
        margin-bottom: 24px;
    }

        .auth-header h1 {
            margin-bottom: 8px;
            font-size: 2rem;
        }

        .auth-header p {
            margin: 0;
            color: #6b7280;
        }

    .password-wrap {
        position: relative;
    }

        .password-wrap .form-control {
            padding-right: 52px;
        }

    .password-toggle {
        position: absolute;
        top: 50%;
        right: 12px;
        transform: translateY(-50%);
        border: none;
        background: transparent;
        font-size: 1rem;
        cursor: pointer;
        padding: 4px 6px;
        color: #475569;
    }

        .password-toggle:hover {
            color: #111827;
        }

    .auth-links {
        text-align: center;
    }
}
@media (max-width: 768px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: 72px;
        height: 100vh;
        z-index: 1000;
        overflow: hidden;
    }

    .brand-title,
    .brand-subtitle,
    .nav-item span:not(.nav-icon),
    .nav-section {
        display: none;
    }

    .sidebar-brand {
        justify-content: center;
        padding: 18px 0;
    }

    .nav-item {
        justify-content: center;
        padding: 16px 0;
    }

    .main-area {
        margin-left: 72px;
        width: calc(100% - 72px);
    }

    .topbar {
        padding: 12px;
    }

    .user-chip {
        max-width: 180px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .content-area {
        padding: 12px;
    }

    .content-card {
        padding: 16px;
        border-radius: 18px;
    }

    h1 {
        font-size: 2rem !important;
        line-height: 1.15;
    }

    .employee-home-grid {
        grid-template-columns: 1fr !important;
        padding: 0;
    }

    .employee-card {
        min-height: 130px;
    }
}
/* =========================================================
   EcomoneyHR - Modo móvil tipo App para empleados
   ========================================================= */
@media (max-width: 768px) {

    /* Oculta el menú lateral en móvil */
    .sidebar {
        display: none !important;
    }

    /* La app ocupa todo el ancho */
    .app-shell {
        display: block !important;
        width: 100%;
        min-height: 100vh;
    }

    .main-area {
        margin-left: 0 !important;
        width: 100% !important;
        min-height: 100vh;
    }

    /* Barra superior tipo app */
    .topbar {
        height: auto;
        padding: 12px 14px;
        gap: 10px;
    }

    .topbar-title {
        font-size: 1rem;
        font-weight: 700;
    }

    .topbar-right {
        gap: 8px;
    }

    .user-chip {
        max-width: 190px;
        padding: 8px 10px;
        font-size: 0.85rem;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .btn-ghost {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    /* Contenido móvil */
    .content-area {
        padding: 12px;
    }

    .content-card {
        padding: 16px;
        border-radius: 20px;
        min-height: calc(100vh - 90px);
    }

    .app-footer {
        display: none;
    }

    /* Tarjetas tipo app */
    .employee-home-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
    }

    .employee-card {
        width: 100% !important;
        min-height: 130px !important;
        border-radius: 22px !important;
        padding: 22px !important;
    }

    .employee-icon {
        font-size: 2rem !important;
    }

    .employee-title {
        font-size: 1.15rem !important;
    }

    .employee-desc {
        font-size: 0.9rem !important;
    }
}
/* Botón home estilo premium */
.home-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    text-decoration: none;
    background: rgba(50, 93, 83, 0.1); /* verde suave */
    border: 1px solid rgba(50, 93, 83, 0.2);
    transition: all 0.2s ease;
}

/* Icono */
.home-icon {
    font-size: 18px;
    color: #325D53; /* tu verde corporativo */
}

/* Hover (desktop) */
.home-btn:hover {
    background: #325D53;
}

    .home-btn:hover .home-icon {
        color: #fff;
    }

/* Click tipo app */
.home-btn:active {
    transform: scale(0.9);
}

/* 👇 AQUÍ */
@media (min-width: 769px) {
    .home-btn {
        display: none;
    }
}