/* TimeGate ESS — full-width responsive shell (content uses container-fluid in layout) */

.ess-shell {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    width: 100%;
    max-width: none;
    margin: 0;
    background: #f8fafc;
}

.ess-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #1e293b;
    color: #fff;
    font-size: 14px;
}

.ess-header__brand {
    font-weight: 600;
}

.ess-header__user {
    font-size: 13px;
    opacity: 0.95;
    max-width: 55%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ess-content {
    flex: 1 1 auto;
    overflow-y: auto;
    padding-bottom: 88px;
}

.ess-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    display: flex;
    width: 100%;
    max-width: none;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    box-sizing: border-box;
}

.ess-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    text-decoration: none;
    color: #64748b;
    font-size: 11px;
    gap: 2px;
}

.ess-tab--active {
    color: #0f172a;
    font-weight: 600;
}

.ess-tab__icon {
    font-size: 18px;
    line-height: 1;
}

.ess-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    color: #64748b;
    font-size: 14px;
}

.ess-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 14px;
}

.ess-card {
    background: #fff;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
}

.ess-card--fill {
    height: 100%;
}

.ess-card--accent {
    border-left: 4px solid #f59e0b;
}

.ess-card--accent-success {
    border-left: 4px solid #22c55e;
}

.ess-card--accent-info {
    border-left: 4px solid #3b82f6;
}

.ess-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.ess-badge--warning {
    background: #fffbeb;
    color: #d97706;
}

.ess-badge--success {
    background: #ecfdf5;
    color: #15803d;
}

.ess-badge--info {
    background: #eff6ff;
    color: #1d4ed8;
}

/* Horizontal strip (e.g. /ess/leaves balance chips) */
.ess-h-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin: 0 -4px;
    padding-left: 4px;
    padding-right: 4px;
}

.ess-h-scroll .ess-leave-card {
    flex: 0 0 auto;
    min-width: 140px;
    width: auto;
}

.ess-leave-card {
    min-width: 0;
    width: 100%;
    border-radius: 14px;
    padding: 12px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
    border-top: 4px solid var(--lt-accent, #3b82f6);
}

.ess-leave-card__name {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

.ess-leave-card__remain {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
}

.ess-shift-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}

.ess-shift-row--today {
    background: #eff6ff;
    padding: 10px 12px;
    border-radius: 12px;
    border-bottom: none;
}

.ess-shift-row--rest {
    color: #94a3b8;
}

.ess-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    border-radius: 12px;
    border: none;
    background: #0f172a;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.ess-btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.ess-btn-outline {
    min-height: 44px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #fff;
    padding: 0 14px;
    font-size: 14px;
    cursor: pointer;
}

.ess-btn-ghost {
    min-height: 44px;
    border: none;
    background: transparent;
    color: #475569;
    font-size: 14px;
    cursor: pointer;
}

.ess-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    font-size: 15px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    margin-bottom: 10px;
}

.ess-cal {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 12px;
}

.ess-cal__dow {
    text-align: center;
    font-size: 11px;
    color: #94a3b8;
    padding: 4px 0;
}

.ess-cal__cell {
    aspect-ratio: 1;
    border-radius: 10px;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.ess-cal__cell--muted {
    visibility: hidden;
}

.ess-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    margin-top: 4px;
}

.ess-dot--present {
    background: #22c55e;
}

.ess-dot--absent {
    background: #ef4444;
}

.ess-dot--late {
    background: #f59e0b;
}

.ess-dot--leave {
    background: #a78bfa;
}

.ess-dot--holiday {
    background: #e2e8f0;
}

.ess-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 14px;
    color: #475569;
    margin-bottom: 12px;
}

.ess-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-pending {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fffbeb;
    color: #d97706;
    font-size: 12px;
    font-weight: 600;
}

.badge-approved {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #15803d;
    font-size: 12px;
    font-weight: 600;
}

.badge-rejected {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 600;
}

.ess-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 300;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.ess-modal {
    width: 100%;
    max-width: 480px;
    max-height: 85dvh;
    overflow-y: auto;
    background: #fff;
    border-radius: 20px 20px 0 0;
    padding: 16px;
    box-sizing: border-box;
}

.ess-modal__title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.ess-cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.ess-cal-nav button {
    min-height: 44px;
    min-width: 44px;
    border: none;
    background: #f1f5f9;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
}

.ess-profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 999px;
    background: #1e293b;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
    margin: 0 auto 8px;
}

.ess-muted {
    color: #94a3b8;
    font-size: 14px;
}

.ess-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}

/* Account / login — Sign in with Google (ESS) */
.ess-btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 12px;
    padding: 14px;
    font-size: 15px;
    font-weight: 500;
    background: #fff;
    color: #3c4043;
    border: 1.5px solid #dadce0;
    border-radius: 12px;
    min-height: 50px;
    cursor: pointer;
    text-decoration: none;
    transition: box-shadow .15s;
}

.ess-btn-google:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

/* Legacy layout: side margins (non-stacked) */
.ess-btn-google:not(.ess-btn-google--stacked) {
    width: calc(100% - 32px);
    margin: 12px 16px 0;
}

/* Stacked under primary Login (Bootstrap d-grid) */
.ess-btn-google--stacked {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

.ess-divider {
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
    margin: 16px 0 0;
    position: relative;
}

.ess-divider::before,
.ess-divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 42%;
    height: 1px;
    background: #e2e8f0;
}

.ess-divider::before {
    left: 0;
}

.ess-divider::after {
    right: 0;
}

@media (min-width: 992px) {
    .ess-shell {
        box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.04);
    }
}

/* ESS login shell */
.ess-login-shell {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: linear-gradient(160deg, #0f172a 0%, #1e293b 45%, #f8fafc 45%);
}

.ess-login-shell__inner {
    width: 100%;
    max-width: 420px;
}

.ess-login-container {
    width: 100%;
}

.ess-login-card {
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
}

.ess-login-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.ess-login-subtitle {
    color: #64748b;
    margin-bottom: 20px;
}

.ess-login-footer a {
    color: #2563eb;
    text-decoration: none;
}

.ess-login-footer a:hover {
    text-decoration: underline;
}

.ess-header__bell {
    font-size: 18px;
    opacity: 0.9;
}

.ess-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ess-section-title {
    font-weight: 600;
    font-size: 1rem;
    color: #0f172a;
}

.ess-checkin-video {
    max-height: 280px;
    object-fit: cover;
    background: #0f172a;
}

.ess-today-label {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.35rem;
}
