:root {
    /* Theme: Dark (Default) */
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --bg-main: radial-gradient(circle at top right, #1e1b4b, #0f172a), #0b0e14;
    --bg-dark: #0b0e14;
    --card-bg: rgba(255, 255, 255, 0.03);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --card-radius: 12px;
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --border-color: rgba(255, 255, 255, 0.08);
    --input-bg: rgba(255, 255, 255, 0.05);
    --nav-bg: rgba(15, 23, 42, 0.8);
    --btn-sec-bg: rgba(255, 255, 255, 0.05);
    --btn-sec-text: #ffffff;
    --auth-bg: radial-gradient(circle at top right, #1e1b4b, #0b0e14);
    --status-bg: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] {
    --bg-main: #f8fafc;
    --bg-dark: #f1f5f9;
    --card-bg: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(59, 130, 246, 0.1);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --card-radius: 12px;
    --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    --border-color: #e2e8f0;
    --input-bg: #ffffff;
    --nav-bg: rgba(255, 255, 255, 0.8);
    --btn-sec-bg: #f1f5f9;
    --btn-sec-text: #1e293b;
    --auth-bg: linear-gradient(135deg, #f8fafc, #e2e8f0);
    --status-bg: rgba(59, 130, 246, 0.05);
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-main);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

html {
    overflow-x: hidden;
    width: 100%;
}

.no-scroll {
    overflow: hidden !important;
    height: 100vh !important;
}

.container {
    padding: 2rem 1.5rem 120px;
    max-width: 600px;
    margin: 0 auto;
}

.header {
    display: none;
    /* Old header hidden */
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 50px; /* Cápsula total */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.header-logo {
    height: 32px; /* Logo más sutil pero definido */
    width: auto;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.2));
}

.header-btn {
    background: var(--btn-sec-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.header-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
    color: white;
}

.user-capsule {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.4rem 0.8rem 0.4rem 0.4rem;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 60%;
}

.user-capsule:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), #1d4ed8);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
}

.user-info-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.user-info-text span {
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-info-text small {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.header-btn.logout {
    margin-left: 0.5rem;
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fadeIn {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Auth Wrapper */
.auth-wrapper {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 2rem;
    background: var(--auth-bg);
}

.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 3rem;
    border-radius: var(--card-radius);
    text-align: center;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
}

.logo-text {
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: 5px;
    color: var(--text-main);
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    margin-bottom: 1.5rem;
    font-family: 'Outfit', sans-serif;
}

.auth-card .logo span {
    color: var(--primary);
    font-weight: 300;
}

.auth-card p {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    color: var(--text-muted);
    padding-left: 0.5rem;
}

.form-group input,
.form-group select {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.2rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s;
    appearance: none;
    -webkit-appearance: none;
}

.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    padding-right: 3rem;
    cursor: pointer;
}

/* Fix for date/time inputs in chrome/safari to prevent overflow and white bg */
.form-group input[type="date"],
.form-group input[type="time"] {
    min-width: 0;
    position: relative;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--input-bg);
    box-shadow: 0 0 20px var(--primary-glow);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 480px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

.form-options {
    margin-bottom: 2rem;
    display: flex;
    justify-content: flex-start;
    padding-left: 0.5rem;
}

.checkmark {
    display: none;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
    user-select: none;
    transition: color 0.3s;
}

.checkbox-container:hover {
    color: var(--text-main);
}

.checkbox-container input {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), #1d4ed8);
    color: white;
    border: none;
    padding: 1.2rem;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 1rem;
}

/* Home Section */
.clock-card {
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.clock-card .time {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    font-variant-numeric: tabular-nums;
    color: var(--text-main);
}

.clock-card .date {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    text-transform: capitalize;
}

.clock-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.btn-clock {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    color: var(--text-main);
    box-shadow: var(--card-shadow);
    cursor: pointer;
    transition: all 0.3s;
}

.btn-clock .icon {
    font-size: 2rem;
}

.btn-clock.active {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.btn-clock:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(1);
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    background: var(--status-bg);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.status-indicator .dot {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
}

.btn-secondary {
    width: 100%;
    background: var(--btn-sec-bg);
    color: var(--btn-sec-text);
    border: 1px solid var(--border-color);
    padding: 1.2rem;
    border-radius: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 1rem;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-sm {
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 10px var(--primary-glow);
}

.btn-sm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px var(--primary-glow);
}

.btn-sm:active {
    transform: translateY(0);
}

.btn-danger {
    background: #ef4444 !important;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3) !important;
}

.btn-danger:hover {
    box-shadow: 0 6px 15px rgba(239, 68, 68, 0.4) !important;
}

/* User Info Header */
.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--glass-bg);
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
}

.user-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-text span {
    font-weight: 700;
    font-size: 0.95rem;
}

.user-text small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.logout-link {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.logout-link:hover {
    color: #ef4444;
}

.profile-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-btn:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

/* View Management */
.view-pane {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.view-pane.active {
    display: block;
}

.view-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 2rem;
    padding-left: 0.5rem;
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

/* Navigation Overhaul */
.bottom-nav {
    position: fixed;
    bottom: 15px;
    left: 15px;
    right: 15px;
    height: 65px;
    background: var(--nav-bg);
    backdrop-filter: blur(25px);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    display: flex;
    justify-content: space-around;
    padding: 0 0.8rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    z-index: 1000;
}

.nav-item {
    color: #64748b;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
    transition: all 0.3s;
    position: relative;
}

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

.nav-item span {
    font-size: 0.7rem;
    font-weight: 600;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item.active i {
    transform: translateY(-5px);
    filter: drop-shadow(0 0 8px var(--primary-glow));
}



/* Calendar Visual */
.calendar-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 1.5rem;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
}

.cal-day {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 1.5rem;
    background: var(--btn-sec-bg);
    border-radius: var(--card-radius);
    border: 1px solid transparent;
    transition: all 0.3s;
}

.cal-day.today {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
}

.cal-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 45px;
}

.day-name {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--text-muted);
}

.day-num {
    font-size: 1.4rem;
    font-weight: 800;
}

.cal-info {
    flex: 1;
}

.shift-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.1));
    color: var(--primary);
    padding: 0.6rem 1.2rem;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.9rem;
}

.no-shift {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
    opacity: 0.5;
}

/* Schedule Enhanced Navigation */
.view-toggle {
    display: flex;
    padding: 4px;
    border-radius: 14px;
    background: var(--btn-sec-bg);
}

.toggle-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s;
}

.toggle-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.schedule-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.2rem;
    margin-bottom: 1.5rem;
    border-radius: 20px;
}

.nav-btn {
    background: var(--btn-sec-bg);
    border: 1px solid var(--border-color);
    color: var(--btn-sec-text);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.period-pill {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: var(--btn-sec-bg);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.95rem;
}

.period-pill i {
    color: var(--primary);
}

/* Monthly Grid Layout */
.calendar-month-grid {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 8px;
    margin-top: 1rem;
    width: 100%;
    flex-shrink: 0;
}

.month-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    position: relative;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}

.month-day .day-num {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.month-day .shift-short {
    font-size: 0.6rem;
    font-weight: 600;
    opacity: 0.9;
}

.day-work {
    background: rgba(16, 185, 129, 0.15);
    color: #4ade80;
    border-color: rgba(16, 185, 129, 0.3);
}

.day-rest {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.2);
}

.day-empty {
    opacity: 0.2;
    background: transparent;
    border: none;
}

.month-header {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 8px;
    margin-bottom: 8px;
    text-align: center;
    width: 100%;
    flex-shrink: 0;
}

.month-header span {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
}

.loading,
.error {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.error {
    color: #ef4444;
}

/* Payroll List */
.list-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Custom Modal System */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 2rem;
}

.modal-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(25px);
    padding: 2.5rem;
    border-radius: var(--card-radius);
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: var(--card-shadow);
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.modal-box h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.modal-box p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.payroll-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    transition: 0.3s;
}

.payroll-item:hover {
    background: var(--btn-sec-bg);
    transform: translateX(5px);
}

.payroll-info {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.payroll-icon {
    width: 45px;
    height: 45px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 1.2rem;
}

.payroll-details h4 {
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.payroll-details span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.btn-download {
    color: var(--primary);
    font-size: 1.1rem;
    background: none;
    border: none;
    cursor: pointer;
}

/* Fichaje History Styles */
.fichaje-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    margin-bottom: 1rem;
    transition: 0.3s;
}

.fichaje-item:hover {
    background: var(--btn-sec-bg);
    transform: translateX(5px);
}

.fichaje-main {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.type-indicator {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 1.1rem;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.fichaje-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fichaje-type {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.fichaje-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.fichaje-time {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
    padding: 0.4rem 0.8rem;
    border-radius: 10px;
}

/* Grouped History Styles */
.history-group {
    margin-bottom: 0.5rem;
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 0.4rem;
}

.group-header:hover {
    background: var(--btn-sec-bg);
}

.group-header h3,
.group-header h4,
.group-header h5 {
    margin: 0;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.group-header h3 {
    font-size: 1.1rem;
}

.group-header h4 {
    font-size: 1rem;
    color: var(--primary);
}

.group-header h5 {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.group-toggle-icon {
    font-size: 0.8rem;
    transition: transform 0.3s;
    color: var(--text-muted);
}

.group-header.collapsed .group-toggle-icon {
    transform: rotate(-90deg);
}

.group-header.collapsed {
    margin-bottom: 0.2rem;
}

.group-content {
    padding-left: 0.5rem;
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.group-header.collapsed+.group-content {
    display: none;
}

.year-group {
    margin-bottom: 0.5rem;
}

.month-group {
    margin-bottom: 0.5rem;
    margin-left: 0.5rem;
}

.week-group {
    margin-bottom: 0.5rem;
    margin-left: 0.5rem;
}

/* Summary Cards (Premium) */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.summary-card {
    padding: 1.2rem 0.8rem;
    text-align: center;
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255,255,255,0.05);
    background: var(--glass-bg);
}

.summary-card:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.08);
    border-color: var(--primary);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.summary-card small {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.summary-card .h-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-main);
}

#home-week-card { border-bottom: 3px solid var(--primary); }
#home-month-card { border-bottom: 3px solid #a855f7; }
#home-vacation-card { border-bottom: 3px solid #10b981; }

@media (max-width: 480px) {
    .summary-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    .summary-card {
        padding: 1rem;
    }
}

/* Incident Items */
.incident-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    margin-bottom: 1rem;
    transition: 0.3s;
}

.incident-content {
    flex: 1;
}

.incident-desc {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.incident-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.status-badge {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    margin-left: 1rem;
}

.status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-closed {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .clock-card .time {
        font-size: 3rem;
    }

    .btn-clock {
        padding: 1.5rem 0.5rem;
    }

    .btn-clock .icon {
        font-size: 1.5rem;
    }

    .summary-card .h-value {
        font-size: 1.4rem;
    }

    /* Calendar Mobile Refinement */
    .calendar-wrapper {
        padding: 0.8rem 0.4rem !important;
    }

    .calendar-month-grid,
    .month-header {
        gap: 4px !important;
    }

    .month-day {
        padding: 0.2rem;
        border-radius: 8px;
        min-height: 42px;
    }

    .month-day .day-num {
        font-size: 0.8rem;
        margin-bottom: 2px;
    }

    .month-day .shift-short {
        font-size: 0.5rem;
        letter-spacing: -0.5px;
    }

    .month-header span {
        font-size: 0.55rem;
        font-weight: 700;
    }

    .period-pill {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
        gap: 0.4rem;
    }

    .nav-btn {
        width: 32px;
        height: 32px;
    }
}

/* Global inputs refinement */
textarea {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    resize: none;
    transition: all 0.3s;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--input-bg);
    box-shadow: 0 0 20px var(--primary-glow);
}

/* Profile Specific Styles */
.profile-card {
    padding: 2.5rem;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
}

.profile-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.avatar-large {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--primary), #1d4ed8);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 auto 1rem;
    box-shadow: 0 10px 20px var(--primary-glow);
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
}

.profile-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.info-group label {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-group span {
    font-size: 1rem;
    font-weight: 600;
}

.divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1.5rem 0;
}

.profile-features {
    display: flex;
    gap: 1rem;
}

.feature-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 1rem;
    background: var(--btn-sec-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: 0.3s;
}

.feature-item.active {
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.05);
}

.feature-item i {
    font-size: 1.1rem;
}

@media (max-width: 480px) {
    .profile-info-grid {
        grid-template-columns: 1fr;
    }

    .profile-features {
        flex-direction: column;
    }
}

.incident-item {
    cursor: pointer;
}

.incident-item:hover {
    background: var(--btn-sec-bg);
    transform: translateX(5px);
}

/* Chat UI */
.chat-container {
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.chat-msg {
    max-width: 85%;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.4;
    position: relative;
    animation: fadeIn 0.3s ease;
    word-break: break-word;
}

.chat-msg.me {
    align-self: flex-end;
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-msg.other {
    align-self: flex-start;
    background: var(--btn-sec-bg);
    color: var(--text-main);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border-color);
}

.chat-msg .sender {
    display: block;
    font-size: 0.65rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    opacity: 0.9;
}

.chat-msg .time {
    display: block;
    font-size: 0.65rem;
    margin-top: 0.4rem;
    opacity: 0.7;
    text-align: right;
}

.chat-input-wrapper {
    display: flex;
    gap: 0.8rem;
    align-items: flex-end;
    background: var(--glass-bg);
    padding: 0.8rem;
    border-radius: var(--card-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
}

.chat-input-wrapper textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-main);
    padding: 0.2rem;
    resize: none;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    max-height: 120px;
    overflow-y: hidden;
}

.btn-send-chat {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-send-chat:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.btn-send-chat:active {
    transform: scale(0.95);
}