.login-page {
    min-height: 100vh;
    display: flex;
    padding: 0;
}

.login-left {
    flex: 1;
    background: var(--gradient-hero);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.15);
    top: -100px;
    right: -100px;
    animation: float 10s ease-in-out infinite;
    filter: blur(60px);
}

.login-left::after {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: rgba(6, 182, 212, 0.1);
    bottom: -80px;
    left: -80px;
    animation: float-slow 14s ease-in-out infinite;
    filter: blur(40px);
}

.login-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.login-orb-1 {
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(139,92,246,0.25), transparent 70%);
    top: 10%;
    right: 8%;
    animation: float 7s ease-in-out infinite, glow-pulse 5s ease-in-out infinite;
}

.login-orb-2 {
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(6,182,212,0.2), transparent 70%);
    bottom: 20%;
    left: 12%;
    animation: float-slow 9s ease-in-out infinite, glow-pulse 4s ease-in-out infinite 1s;
}

.login-orb-3 {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(165,180,252,0.35), transparent 70%);
    top: 55%;
    right: 20%;
    animation: float-reverse 6s ease-in-out infinite;
}

.login-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(165,180,252,0.5);
    border-radius: 50%;
    pointer-events: none;
}

.login-particle:nth-child(1) { top: 15%; left: 25%; animation: float 4s ease-in-out infinite; }
.login-particle:nth-child(2) { top: 35%; left: 75%; animation: float 5s ease-in-out infinite 0.5s; }
.login-particle:nth-child(3) { top: 65%; left: 40%; animation: float 6s ease-in-out infinite 1s; }
.login-particle:nth-child(4) { top: 80%; left: 70%; animation: float 4.5s ease-in-out infinite 1.5s; }
.login-particle:nth-child(5) { top: 45%; left: 10%; animation: float 5.5s ease-in-out infinite 0.8s; }
.login-particle:nth-child(6) { top: 25%; left: 55%; animation: float 7s ease-in-out infinite 2s; }

.login-morph {
    position: absolute;
    width: 160px;
    height: 160px;
    background: linear-gradient(135deg, rgba(139,92,246,0.1), rgba(6,182,212,0.08));
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: morph 12s ease-in-out infinite;
    filter: blur(3px);
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, -25px); }
}

.login-left-content {
    position: relative;
    z-index: 2;
}

.login-left h1 {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 12px;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.login-left h1 span {
    background: linear-gradient(135deg, #a5b4fc, #c4b5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-left p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: 420px;
}

.login-features {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-feature {
    display: flex;
    align-items: center;
    gap: 14px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.login-feature-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.login-feature-icon svg {
    width: 20px;
    height: 20px;
    stroke: #a5b4fc;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--bg);
}

.login-card {
    width: 100%;
    max-width: 420px;
    animation: fade-in-up 0.6s var(--ease) both;
}

.login-header {
    margin-bottom: 36px;
}

.login-logo {
    width: 52px;
    height: 52px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    box-shadow: var(--shadow-primary);
    animation: scale-in 0.5s var(--ease) both;
    animation-delay: 0.2s;
}

.login-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.login-form .form-group { margin-bottom: 20px; }

.login-form .input {
    padding: 13px 16px;
    font-size: 0.95rem;
    border-radius: var(--radius);
    background: var(--bg-card-solid);
}

.login-form .btn {
    padding: 14px 24px;
    font-size: 0.95rem;
    margin-top: 4px;
    border-radius: var(--radius);
    font-weight: 700;
    letter-spacing: 0.01em;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.login-google-btn {
    width: 100%;
    padding: 13px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card-solid);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.login-google-btn:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light), 0 8px 20px rgba(99,102,241,0.1);
    transform: translateY(-1px);
}
.login-google-btn:active {
    transform: scale(0.98);
}

.login-footer {
    text-align: center;
    margin-top: 28px;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.login-error {
    background: var(--danger-light);
    color: var(--danger);
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 18px;
    display: none;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.login-error.show { display: flex; align-items: center; gap: 8px; }

.dashboard-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

.dashboard-main {
    flex: 1;
    padding: 32px;
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
}

.welcome-section {
    margin-bottom: 32px;
}

.welcome-section h1 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.welcome-section p { color: var(--text-secondary); font-size: 0.92rem; }
.welcome-section .date-display {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2px;
    font-family: var(--font-mono);
}

.checkin-section { margin-bottom: 32px; }

.checkin-card {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 32px;
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.checkin-card:hover {
    box-shadow: 0 8px 30px rgba(99,102,241,0.08);
}

.checkin-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.checkin-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkin-btn {
    min-width: 200px;
    min-height: 56px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    letter-spacing: 0.01em;
}

.checkin-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

.checkin-btn.checkin-active {
    background: var(--gradient-primary);
    color: white;
    animation: pulse-glow 2.5s ease-in-out infinite;
    box-shadow: var(--shadow-primary);
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 var(--primary-glow), var(--shadow-primary); }
    50% { box-shadow: 0 0 0 12px rgba(99, 102, 241, 0), var(--shadow-primary); }
}

.checkin-status { flex: 1; }

.checkin-status .status-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.checkin-status .status-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    min-width: 100px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.checkin-status .status-value { font-weight: 700; font-size: 1.05rem; }
.checkin-status .status-value.time {
    font-family: var(--font-mono);
    color: var(--primary);
    font-size: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 32px;
}

.stat-card {
    padding: 22px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(99,102,241,0.08);
}

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}

.stat-card .stat-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.stat-card .stat-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-card.present::before { background: var(--success); }
.stat-card.present .stat-icon { background: var(--success-light); color: var(--success); }
.stat-card.present .stat-value { color: var(--success); }

.stat-card.late::before { background: var(--warning); }
.stat-card.late .stat-icon { background: var(--warning-light); color: var(--warning); }
.stat-card.late .stat-value { color: var(--warning); }

.stat-card.hours::before { background: var(--primary); }
.stat-card.hours .stat-icon { background: var(--primary-light); color: var(--primary); }
.stat-card.hours .stat-value { color: var(--primary); }

.stat-card.percentage::before { background: var(--purple); }
.stat-card.percentage .stat-icon { background: var(--purple-light); color: var(--purple); }
.stat-card.percentage .stat-value { color: var(--purple); }

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 32px;
}

.chart-container {
    position: relative;
    height: 290px;
    padding: 8px;
}

.history-section { margin-bottom: 32px; }

.history-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.history-filters .input { width: auto; min-width: 150px; }
.history-table { max-height: 420px; overflow-y: auto; }

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: var(--shadow-primary);
}

.user-info { display: flex; flex-direction: column; }
.user-info .user-name { font-weight: 700; font-size: 0.88rem; }
.user-info .user-role { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; }

@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .login-left { display: none; }
    .login-right { flex: 1; }
}

@media (max-width: 768px) {
    .dashboard-main { padding: 18px; }
    .checkin-card { flex-direction: column; gap: 24px; }
    .checkin-actions { flex-direction: row; width: 100%; }
    .checkin-btn { flex: 1; min-width: auto; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stat-card { padding: 16px; }
    .stat-card .stat-value { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .checkin-actions { flex-direction: column; }
    .login-page { flex-direction: column; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.3); }
}
