/* =============================================
   ATTENDANCE MANAGEMENT SYSTEM - PREMIUM UI
   Mobile-first responsive design
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --primary: #6C5CE7;
    --primary-light: #A29BFE;
    --primary-dark: #5A4BD1;
    --primary-glow: rgba(108, 92, 231, 0.35);
    --secondary: #00CEC9;
    --success: #00B894;
    --success-light: #55EFC4;
    --danger: #FF6B6B;
    --danger-dark: #EE5A24;
    --warning: #FDCB6E;
    --info: #74B9FF;
    --dark: #2D3436;
    --dark-light: #636E72;
    --light: #F8F9FD;
    --white: #FFFFFF;
    --gray: #B2BEC3;
    --gray-light: #DFE6E9;
    --border: rgba(0,0,0,0.06);
    --shadow-xs: 0 1px 3px rgba(0,0,0,0.04);
    --shadow: 0 4px 20px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.08);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.12);
    --shadow-xl: 0 24px 64px rgba(0,0,0,0.16);
    --radius: 20px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --radius-full: 9999px;
    --glass: rgba(255,255,255,0.15);
    --glass-border: rgba(255,255,255,0.25);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--light);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--dark);
}

/* =============================================
   LOGIN PAGES
   ============================================= */

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0052cc 0%, #0066ff 25%, #1e90ff 50%, #4169e1 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-body::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    top: -250px;
    right: -150px;
    filter: blur(40px);
}

.login-body::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    bottom: -150px;
    left: -100px;
    filter: blur(40px);
}

.admin-login-body {
    background: linear-gradient(135deg, #0c0c1d 0%, #1a1a3e 50%, #2d2d6b 100%);
}

.admin-login-body::before {
    background: rgba(108, 92, 231, 0.1);
}

.login-container {
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: rgba(20, 70, 150, 0.3);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 24px;
    padding: 48px 40px 44px;
    box-shadow: 0 20px 70px rgba(0,0,0,0.3), inset 0 0 70px rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.25);
}

.login-header {
    text-align: center;
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.login-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255,255,255,0.25), rgba(255,255,255,0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 12px auto;
    font-size: 28px;
    color: white;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15), inset 0 0 16px rgba(255,255,255,0.2);
    transform: none;
}

.admin-icon {
    background: linear-gradient(135deg, #1a1a3e, #6C5CE7);
    box-shadow: 0 12px 32px rgba(26, 26, 62, 0.4);
}

.login-header h2 {
    font-weight: 700;
    color: white;
    margin-bottom: 0;
    font-size: 28px;
    letter-spacing: -0.5px;
}

.login-header .text-muted {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.8) !important;
}

.login-card .form-label {
    font-weight: 600;
    font-size: 13px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.login-card .form-control {
    border-radius: 10px;
    padding: 12px 14px;
    border: 2px solid rgba(255,255,255,0.4);
    font-size: 14px;
    font-weight: 500;
    background: rgba(255,255,255,0.9);
    transition: all 0.3s ease;
    color: #0052cc;
}

.login-card .form-control:focus {
    border-color: rgba(255,255,255,0.7);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.15);
    background: white;
    color: #0052cc;
}

.login-card .form-control::placeholder {
    color: rgba(0,82,204,0.6);
    font-weight: 400;
}

.login-btn {
    border-radius: 10px;
    padding: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #1a3a6b !important;
    border: none !important;
    color: white !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.3);
    background: #0f2d52 !important;
}

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

.admin-login-body .login-btn {
    background: linear-gradient(135deg, #1a1a3e, #6C5CE7) !important;
    box-shadow: 0 8px 24px rgba(26, 26, 62, 0.4);
}

/* =============================================
   EMPLOYEE APP LAYOUT - PREMIUM
   ============================================= */

.app-body {
    background: var(--light);
    min-height: 100vh;
    max-width: 540px;
    margin: 0 auto;
    position: relative;
    overflow-x: hidden;
}

.app-topbar {
    background: linear-gradient(135deg, #6C5CE7 0%, #a363d9 100%);
    padding: 20px 20px 50px 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    z-index: 1;
}

.app-topbar::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 0;
    right: 0;
    height: 60px;
    background: inherit;
    border-radius: 0 0 32px 32px;
    z-index: -1;
}

.app-topbar .user-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.app-topbar .user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: var(--glass);
    border: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    backdrop-filter: blur(10px);
}

.app-topbar .user-name {
    font-size: 17px;
    font-weight: 700;
    color: white;
    margin: 0;
    letter-spacing: -0.3px;
}

.app-topbar .user-id {
    font-size: 13px;
    color: rgba(255,255,255,0.65);
    font-weight: 500;
}

.app-topbar .btn-logout {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.app-topbar .btn-logout:hover {
    background: rgba(255,255,255,0.25);
    color: white;
}

.app-content {
padding: 0 20px 110px;
margin-top: -30px;
position: relative;
z-index: 2;
padding-bottom:140px !important;

}
/* Date Time Card - Glass Effect */
.datetime-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    box-shadow: var(--shadow-md);
    margin-bottom: 16px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.datetime-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--secondary));
}

.time-display {
    font-size: 52px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--dark), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
    line-height: 1;
    margin-bottom: 6px;
    font-variant-numeric: tabular-nums;
}

.date-display {
    font-size: 14px;
    color: var(--dark-light);
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Status Card */
.status-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    border: 1px solid var(--border);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.status-pending {
    background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
    color: #E65100;
    box-shadow: 0 4px 12px rgba(230, 81, 0, 0.15);
}

.status-active {
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    color: #1B5E20;
    box-shadow: 0 4px 12px rgba(27, 94, 32, 0.15);
    animation: pulse-green 2s ease-in-out infinite;
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 4px 12px rgba(27, 94, 32, 0.15); }
    50% { box-shadow: 0 4px 20px rgba(27, 94, 32, 0.3); }
}

.status-complete {
    background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
    color: #0D47A1;
    box-shadow: 0 4px 12px rgba(13, 71, 161, 0.15);
}

.status-times {
    margin-top: 14px;
    display: flex;
    justify-content: center;
    gap: 28px;
    font-size: 14px;
}

.status-times span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--dark-light);
}

.status-times span i {
    font-size: 12px;
}

/* Action Buttons - Premium */
.action-buttons {
    margin-bottom: 16px;
}

.btn-punch-in,
.btn-punch-out,
.btn-punch-done {
    width: 100%;
    padding: 24px 20px;
    border-radius: var(--radius);
    font-size: 18px;
    font-weight: 800;
    border: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-punch-in::after,
.btn-punch-out::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.btn-punch-in:hover::after,
.btn-punch-out:hover::after {
    left: 100%;
}

.btn-punch-in {
    background: linear-gradient(135deg, #00B894, #00CEC9);
    box-shadow: 0 8px 32px rgba(0, 184, 148, 0.4);
}

.btn-punch-in:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 40px rgba(0, 184, 148, 0.5);
    color: white;
}

.btn-punch-in:active {
    transform: translateY(-1px);
}

.btn-punch-out {
    background: linear-gradient(135deg, #FF6B6B, #EE5A24);
    box-shadow: 0 8px 32px rgba(255, 107, 107, 0.4);
}

.btn-punch-out:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 40px rgba(255, 107, 107, 0.5);
    color: white;
}

.btn-punch-out:active {
    transform: translateY(-1px);
}

.btn-punch-done {
    background: linear-gradient(135deg, #636E72, #2D3436);
    box-shadow: 0 4px 16px rgba(45, 52, 54, 0.3);
}

.btn-punch-in i,
.btn-punch-out i,
.btn-punch-done i {
    font-size: 24px;
}

/* Location Status */
.location-status {
    background: linear-gradient(135deg, #E3F2FD, #E8EAF6);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    border: 1px solid rgba(108, 92, 231, 0.15);
}

/* Quick Links */
.quick-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.quick-link-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px 24px;
    text-decoration: none;
    color: var(--dark);
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--border);
}

.quick-link-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--primary);
    border-color: var(--primary-light);
}

.quick-link-card i {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(163, 99, 217, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary);
    flex-shrink: 0;
}

.quick-link-card span {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.2px;
}

/* =============================================
   ATTENDANCE HISTORY - PREMIUM
   ============================================= */

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.history-header h5 {
    margin: 0;
    color: var(--dark);
    font-weight: 700;
    font-size: 18px;
}

.history-header .badge {
    background: linear-gradient(135deg, var(--primary), var(--primary-light)) !important;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 12px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.history-item:hover {
    box-shadow: var(--shadow);
    border-color: transparent;
}

.history-date {
    text-align: center;
    min-width: 54px;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.08), rgba(163, 99, 217, 0.08));
    border-radius: var(--radius-sm);
    padding: 10px 8px;
}

.date-day {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.date-month {
    font-size: 11px;
    color: var(--primary-dark);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.date-year {
    font-size: 10px;
    color: var(--gray);
    font-weight: 600;
}

.history-details {
    flex: 1;
}

.history-times {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 14px;
}

.time-in {
    color: var(--success);
    font-weight: 600;
}

.time-out {
    color: var(--danger);
    font-weight: 600;
}

.history-status .badge {
    font-weight: 700;
    font-size: 11px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--gray);
}

.empty-state i {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.3;
    color: var(--primary);
}

.empty-state p {
    font-weight: 500;
    font-size: 16px;
}

/* =============================================
   ADMIN PANEL LAYOUT - PREMIUM
   ============================================= */

.admin-body {
    background: var(--light);
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 270px;
    height: 100vh;
    background: linear-gradient(180deg, #0c0c1d 0%, #1a1a3e 50%, #2d2d6b 100%);
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: 4px 0 32px rgba(0,0,0,0.15);
}

.sidebar-header {
    padding: 28px 24px 20px;
    text-align: center;
    color: white;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-header i.fa-2x {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-header .sidebar-logo {
    width: 40px;
    height: 40px;
    max-width: 40px;
    max-height: 40px;
    object-fit: contain;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.15);
    padding: 3px;
    background: rgba(255,255,255,0.1);
}

.login-logo {
    width: 80px !important;
    height: 80px !important;
    max-width: 80px !important;
    max-height: 80px !important;
    object-fit: contain;
    border-radius: 12px;
}

.topbar-logo {
    width: 40px !important;
    height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    min-width: 40px;
    object-fit: contain;
    border-radius: 12px;
    border: 2px solid var(--glass-border);
    padding: 2px;
    background: var(--glass);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.sidebar-header h5 {
    margin: 12px 0 0;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.3px;
}

.sidebar-header p {
    opacity: 0.5;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-nav {
    padding: 16px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 18px;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    transition: all 0.25s ease;
    font-weight: 600;
    font-size: 14px;
    position: relative;
}

.sidebar-nav .nav-link:hover {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.9);
}

.sidebar-nav .nav-link.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.4);
}

.sidebar-nav .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 15px;
}

/* Main Content */
.admin-main {
    margin-left: 270px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.admin-topbar {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 18px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 0 var(--border);
    position: sticky;
    top: 0;
    z-index: 1050;
}

.admin-topbar h5 {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.2px;
}

.sidebar-toggle {
    display: none;
    text-decoration: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background: var(--light);
    transition: all 0.2s;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    background: var(--gray-light);
}

.admin-avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.admin-content {
    padding: 28px;
}

/* Stats Cards - Premium */
.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    border-left: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-primary::before { background: linear-gradient(180deg, var(--primary), var(--primary-light)); }
.stat-success::before { background: linear-gradient(180deg, var(--success), var(--success-light)); }
.stat-danger::before { background: linear-gradient(180deg, var(--danger), var(--danger-dark)); }
.stat-info::before { background: linear-gradient(180deg, var(--info), #0984E3); }

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 22px;
}

.stat-primary .stat-icon { background: rgba(108, 92, 231, 0.1); color: var(--primary); }
.stat-success .stat-icon { background: rgba(0, 184, 148, 0.1); color: var(--success); }
.stat-danger .stat-icon { background: rgba(255, 107, 107, 0.1); color: var(--danger); }
.stat-info .stat-icon { background: rgba(116, 185, 255, 0.1); color: var(--info); }

.stat-value {
    font-size: 36px;
    font-weight: 800;
    color: var(--dark);
    line-height: 1;
    margin-bottom: 6px;
    letter-spacing: -1px;
}

.stat-label {
    font-size: 12px;
    color: var(--dark-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* Cards - Premium */
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: var(--white);
    overflow: hidden;
}

.card-header {
    border-bottom: 1px solid var(--border);
    padding: 18px 22px;
    background: var(--white) !important;
}

.card-header h5 {
    font-weight: 700;
    color: var(--dark);
    font-size: 16px;
    letter-spacing: -0.2px;
}

.card-body {
    padding: 22px;
}

/* Tables - Premium */
.table {
    margin: 0;
}

.table th {
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--dark-light);
    border-top: none;
    padding: 14px 16px;
    background: var(--light);
}

.table td {
    vertical-align: middle;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
    border-color: var(--border);
}

.table-hover tbody tr:hover {
    background: rgba(108, 92, 231, 0.03);
}

.table td strong {
    font-weight: 700;
    letter-spacing: -0.2px;
}

.table td .text-muted {
    font-size: 12px;
    font-weight: 500;
}

/* =============================================
   BADGES & FORM ELEMENTS
   ============================================= */

.badge {
    font-weight: 700;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 11px;
    letter-spacing: 0.3px;
}

.badge.bg-success { background: linear-gradient(135deg, var(--success), #00CEC9) !important; }
.badge.bg-warning { background: linear-gradient(135deg, #F39C12, #E67E22) !important; color: white !important; }
.badge.bg-danger { background: linear-gradient(135deg, var(--danger), var(--danger-dark)) !important; }
.badge.bg-primary { background: linear-gradient(135deg, var(--primary), var(--primary-light)) !important; }
.badge.bg-secondary { background: linear-gradient(135deg, var(--gray), var(--dark-light)) !important; }

.alert {
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 14px;
    padding: 14px 18px;
}

.alert-success {
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    color: #1B5E20;
    border-left: 4px solid var(--success);
}

.alert-danger {
    background: linear-gradient(135deg, #FFEBEE, #FFCDD2);
    color: #B71C1C;
    border-left: 4px solid var(--danger);
}

.form-control, .form-select {
    border-radius: var(--radius-sm);
    padding: 11px 16px;
    border: 2px solid var(--gray-light);
    font-weight: 500;
    font-size: 14px;
    transition: all 0.25s ease;
    background: var(--white);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.form-label {
    font-weight: 700;
    font-size: 13px;
    color: var(--dark);
    letter-spacing: -0.1px;
    margin-bottom: 6px;
}

.btn {
    border-radius: var(--radius-xs);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.25s ease;
    padding: 10px 20px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light)) !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
}

.btn-outline-primary {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

.btn-outline-primary:hover {
    background: var(--primary) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.btn-outline-success {
    border-color: var(--success) !important;
    color: var(--success) !important;
}

.btn-outline-success:hover {
    background: var(--success) !important;
    color: white !important;
}

.btn-outline-danger {
    border-color: var(--danger) !important;
    color: var(--danger) !important;
}

.btn-outline-danger:hover {
    background: var(--danger) !important;
    color: white !important;
}

.btn-outline-warning {
    border-color: #E67E22 !important;
    color: #E67E22 !important;
}

.btn-outline-warning:hover {
    background: #E67E22 !important;
    color: white !important;
}

.btn-outline-info {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

.btn-outline-info:hover {
    background: var(--primary) !important;
    color: white !important;
}

.btn-dark {
    background: linear-gradient(135deg, #1a1a3e, #2d2d6b) !important;
    border: none !important;
}

/* Modal - Premium */
.modal-content {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.modal-body {
    padding: 40px 30px 30px;
}

#alertIcon i.text-success {
    color: var(--success) !important;
}

#alertIcon i.text-danger {
    color: var(--danger) !important;
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */

@media (max-width: 991px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.active {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .admin-content {
        padding: 20px;
    }

    .stat-card {
        padding: 18px;
    }

    .stat-value {
        font-size: 32px;
    }

    /* Stack form columns on tablet */
    .modal-dialog {
        margin: 10px;
    }
}

@media (max-width: 576px) {
    .login-card {
        padding: 32px 24px 28px;
        border-radius: 24px;
    }

    .time-display {
        font-size: 42px;
    }

    .btn-punch-in,
    .btn-punch-out,
    .btn-punch-done {
        padding: 20px 16px;
        font-size: 16px;
    }

    .btn-punch-in i,
    .btn-punch-out i,
    .btn-punch-done i {
        font-size: 22px;
    }

    .admin-content {
        padding: 16px;
    }

    .stat-value {
        font-size: 28px;
    }

    .stat-label {
        font-size: 10px;
    }

    .admin-topbar {
        padding: 14px 16px;
    }

    .admin-topbar h5 {
        font-size: 14px;
    }

    /* Improve table readability on small screens */
    .table th, .table td {
        font-size: 12px;
        padding: 8px 6px;
        white-space: nowrap;
    }

    /* Better card spacing on mobile */
    .card {
        border-radius: 12px !important;
    }

    .card-body {
        padding: 16px !important;
    }

    /* Stat cards - 2 columns on small phones */
    .row .col-md-3.col-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* =============================================
   UTILITIES & ANIMATIONS
   ============================================= */

html {
    scroll-behavior: smooth;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-light);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.datetime-card,
.status-card,
.action-buttons,
.quick-links,
.stat-card,
.card {
    animation: fadeInUp 0.5s ease forwards;
}

.status-card { animation-delay: 0.05s; }
.action-buttons { animation-delay: 0.1s; }
.quick-links { animation-delay: 0.15s; }

@supports (padding-top: env(safe-area-inset-top)) {
    .app-topbar {
        padding-top: calc(20px + env(safe-area-inset-top));
    }

    .admin-sidebar {
        padding-top: env(safe-area-inset-top);
    }
}

@media print {
    .admin-sidebar,
    .admin-topbar,
    .sidebar-toggle,
    .btn,
    .app-topbar {
        display: none !important;
    }

    .admin-main {
        margin-left: 0 !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    body {
        background: white;
    }
}

::selection {
    background: var(--primary-light);
    color: white;
}

/* Table responsive - ensure horizontal scrolling works */
.table-responsive {
    overflow-x: auto !important;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: -ms-autohiding-scrollbar;
    display: block;
    width: 100%;
}

.card-body.p-0 {
    overflow: visible !important;
}

.card-body.p-0 .table-responsive {
    overflow-x: auto !important;
}

.card > .card-body.p-0 > .table-responsive {
    overflow-x: auto !important;
    max-width: 100%;
}

/* =============================================
   BOTTOM NAVIGATION - MOBILE APP STYLE
   ============================================= */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 540px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
    border-top: 1px solid var(--border);
    z-index: 1000;
    height:70px;
    padding-bottom:15px;
}

body{
padding-bottom:80px;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    text-decoration: none;
    color: var(--gray);
    font-size: 10px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 12px;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.bottom-nav-item i {
    font-size: 20px;
    transition: all 0.2s;
}

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

.bottom-nav-item.active i {
    transform: scale(1.1);
}

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

/* =============================================
   PROFILE PAGE - PREMIUM
   ============================================= */

.profile-header-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--shadow-md);
    margin-bottom: 16px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.profile-header-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--secondary));
}

.profile-avatar-lg {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 32px;
    color: white;
    box-shadow: 0 8px 24px rgba(108, 92, 231, 0.35);
}

.profile-name {
    font-size: 20px;
    font-weight: 800;
    color: var(--dark);
    margin: 0 0 4px;
    letter-spacing: -0.3px;
}

.profile-designation {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
}

.profile-emp-id {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--dark-light);
    background: var(--light);
    padding: 4px 14px;
    border-radius: var(--radius-full);
    letter-spacing: 0.5px;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.profile-stat-item {
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 16px 10px;
    text-align: center;
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--border);
}

.profile-stat-num {
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
}

.profile-stat-lbl {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--dark-light);
    margin-top: 4px;
}

.profile-section-title {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--dark-light);
    margin-bottom: 10px;
    padding-left: 4px;
}

.profile-details-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 20px;
}

.profile-detail-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.profile-detail-item:last-child {
    border-bottom: none;
}

.profile-detail-item:hover {
    background: rgba(108, 92, 231, 0.02);
}

.profile-detail-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.profile-detail-info {
    flex: 1;
    min-width: 0;
}

.profile-detail-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.profile-detail-value {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =============================================
   UTILITY CLASSES — Replaces inline styles
   ============================================= */

.card-modern {
    border: none;
    border-radius: 16px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
}

.card-modern-lg {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.card-shadow-var {
    border: none;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.form-no-margin { margin: 0; }

.nav-button {
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.btn-logout-inline {
    border: none;
    cursor: pointer;
}

.btn-logout-disabled {
    opacity: 0.5;
    border: none;
    cursor: pointer;
}

.fs-10 { font-size: 10px; }
.fs-11 { font-size: 11px; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }

.text-color-primary { color: var(--primary); }
.text-color-success { color: var(--success); }
.text-color-danger  { color: #FF6B6B; }
.text-color-warning { color: #e67e22; }
.text-color-purple  { color: #6C5CE7; }
.text-color-green   { color: #00B894; }

.bg-light-table { background: #f8f9fa; }

.transition-bg { transition: background 0.15s; }

.records-badge{
background:linear-gradient(135deg,#6a5cff,#9a8cff);
color:#fff;
padding:8px 16px;
border-radius:20px;
font-size:14px;
font-weight:600;
}

/* CSV Button */

.btn-csv{
border:2px solid #16a085;
color:#16a085;
padding:8px 18px;
border-radius:10px;
font-weight:500;
}

.btn-csv:hover{
background:#16a085;
color:white;
}

/* Excel Button */

.btn-excel{
border:2px solid #6c63ff;
color:#6c63ff;
padding:8px 18px;
border-radius:10px;
font-weight:500;
}

.btn-excel:hover{
background:#6c63ff;
color:white;
}

/* Google Button */

.btn-google{
border:2px solid #ff5b5b;
color:#ff5b5b;
padding:8px 18px;
border-radius:10px;
font-weight:500;
background:white;
}

.btn-google:hover{
background:#ff5b5b;
color:white;
}

.detail-panel{
margin-bottom:90px;
}
