/* =============================================
   CLEANING APP - CUSTOM STYLES
   ============================================= */

/* ===== Google Fonts ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ===== Root Variables ===== */
:root {
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #3B82F6;
    --secondary: #10B981;
    --secondary-dark: #059669;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #06B6D4;
    --dark: #1E293B;
    --dark-2: #334155;
    --dark-3: #475569;
    --light: #F8FAFC;
    --light-2: #F1F5F9;
    --light-3: #E2E8F0;
    --white: #FFFFFF;
    --sidebar-width: 260px;
    --header-height: 65px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light);
    color: var(--dark);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* =============================================
   LOGIN PAGE
   ============================================= */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1E293B 0%, #2563EB 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.login-wrapper::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
    bottom: -50px;
    left: -50px;
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 420px;
    padding: 40px;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo .logo-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 28px;
    color: white;
}

.login-logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 5px;
}

.login-logo p {
    color: var(--dark-3);
    font-size: 14px;
}

.login-card .form-control {
    border: 2px solid var(--light-3);
    border-radius: var(--radius-sm);
    padding: 12px 15px;
    font-size: 14px;
    transition: var(--transition);
    background: var(--light);
}

.login-card .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: var(--white);
}

.login-card .form-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--dark-2);
    margin-bottom: 6px;
}

.login-card .input-group-text {
    border: 2px solid var(--light-3);
    border-right: none;
    background: var(--light);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    color: var(--dark-3);
}

.login-card .input-group .form-control {
    border-left: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.4);
}

.lang-switch {
    text-align: center;
    margin-top: 20px;
}

.lang-switch a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--dark-3);
    transition: var(--transition);
}

.lang-switch a:hover, .lang-switch a.active {
    background: var(--light-2);
    color: var(--primary);
}

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--dark) 0%, #0F172A 100%);
    z-index: 1000;
    transition: var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
}

.sidebar-brand {
    color: white;
    font-size: 18px;
    font-weight: 700;
}

.sidebar-brand small {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: rgba(255,255,255,0.5);
    margin-top: 2px;
}

.sidebar-menu {
    padding: 15px 0;
}

.menu-label {
    padding: 10px 20px 5px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.3);
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    color: rgba(255,255,255,0.6);
    font-size: 13.5px;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
    margin: 2px 0;
}

.sidebar-menu a:hover {
    color: white;
    background: rgba(255,255,255,0.05);
}

.sidebar-menu a.active {
    color: white;
    background: rgba(37, 99, 235, 0.15);
    border-left-color: var(--primary);
}

.sidebar-menu a i {
    width: 20px;
    text-align: center;
    font-size: 15px;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 15px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.7);
}

.sidebar-user .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--info));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.sidebar-user .user-info {
    flex: 1;
}

.sidebar-user .user-name {
    font-size: 13px;
    font-weight: 600;
    color: white;
}

.sidebar-user .user-role {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
}

/* =============================================
   TOP HEADER
   ============================================= */
.main-header {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-height);
    background: var(--white);
    border-bottom: 1px solid var(--light-3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    z-index: 999;
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-left h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
}

.header-left .breadcrumb-text {
    font-size: 12px;
    color: var(--dark-3);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-right .lang-toggle {
    display: flex;
    background: var(--light-2);
    border-radius: 8px;
    overflow: hidden;
}

.header-right .lang-toggle a {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--dark-3);
    transition: var(--transition);
}

.header-right .lang-toggle a.active {
    background: var(--primary);
    color: white;
}

.header-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-2);
    color: var(--dark-3);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.header-btn:hover {
    background: var(--primary);
    color: white;
}

.header-btn .badge-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid white;
}

/* =============================================
   MAIN CONTENT
   ============================================= */
.main-content {
    margin-left: var(--sidebar-width);
    padding-top: var(--header-height);
    min-height: 100vh;
}

.content-wrapper {
    padding: 25px;
}

/* ===== Page Header ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.page-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
}

.page-header .subtitle {
    font-size: 13px;
    color: var(--dark-3);
    margin-top: 3px;
}

/* ===== Stat Cards ===== */
.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--light-3);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 15px;
}

.stat-card .stat-icon.blue {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.stat-card .stat-icon.green {
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary);
}

.stat-card .stat-icon.yellow {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.stat-card .stat-icon.cyan {
    background: rgba(6, 182, 212, 0.1);
    color: var(--info);
}

.stat-card .stat-icon.red {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--dark-3);
    margin-top: 4px;
    font-weight: 500;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    border-radius: 0 0 0 80px;
    opacity: 0.05;
}

.stat-card:nth-child(1)::after { background: var(--primary); }
.stat-card:nth-child(2)::after { background: var(--secondary); }
.stat-card:nth-child(3)::after { background: var(--warning); }
.stat-card:nth-child(4)::after { background: var(--info); }

/* ===== Cards ===== */
.card-custom {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--light-3);
    overflow: hidden;
}

.card-custom .card-header-custom {
    padding: 18px 22px;
    border-bottom: 1px solid var(--light-3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--white);
}

.card-custom .card-header-custom h5 {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-custom .card-body-custom {
    padding: 22px;
}

/* ===== Tables ===== */
.table-custom {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-custom thead th {
    background: var(--light);
    padding: 12px 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--dark-3);
    border-bottom: 2px solid var(--light-3);
    white-space: nowrap;
}

.table-custom tbody td {
    padding: 12px 15px;
    font-size: 13.5px;
    border-bottom: 1px solid var(--light-2);
    vertical-align: middle;
}

.table-custom tbody tr:hover {
    background: var(--light);
}

.table-custom tbody tr:last-child td {
    border-bottom: none;
}

/* ===== Status Badges ===== */
.badge-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.badge-status.active,
.badge-status.completed { 
    background: rgba(16, 185, 129, 0.1); 
    color: var(--secondary); 
}
.badge-status.active::before,
.badge-status.completed::before { 
    background: var(--secondary); 
}

.badge-status.pending { 
    background: rgba(245, 158, 11, 0.1); 
    color: var(--warning); 
}
.badge-status.pending::before { 
    background: var(--warning); 
}

.badge-status.in_progress { 
    background: rgba(37, 99, 235, 0.1); 
    color: var(--primary); 
}
.badge-status.in_progress::before { 
    background: var(--primary); 
}

.badge-status.inactive,
.badge-status.cancelled { 
    background: rgba(239, 68, 68, 0.1); 
    color: var(--danger); 
}
.badge-status.inactive::before,
.badge-status.cancelled::before { 
    background: var(--danger); 
}

.badge-priority {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.badge-priority.high { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.badge-priority.medium { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.badge-priority.low { background: rgba(16, 185, 129, 0.1); color: var(--secondary); }

/* ===== Buttons ===== */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
    color: white;
}

.btn-success-custom {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-success-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
    color: white;
}

.btn-outline-custom {
    background: transparent;
    color: var(--dark-3);
    border: 2px solid var(--light-3);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-outline-custom:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.btn-sm-action {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 13px;
}

.btn-sm-action.edit {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}
.btn-sm-action.edit:hover {
    background: var(--primary);
    color: white;
}

.btn-sm-action.delete {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}
.btn-sm-action.delete:hover {
    background: var(--danger);
    color: white;
}

/* ===== Forms ===== */
.form-custom .form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark-2);
    margin-bottom: 6px;
}

.form-custom .form-control,
.form-custom .form-select {
    border: 2px solid var(--light-3);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 13.5px;
    transition: var(--transition);
    background: var(--light);
}

.form-custom .form-control:focus,
.form-custom .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: var(--white);
}

/* ===== Photo Gallery ===== */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.photo-card {
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--light-3);
    transition: var(--transition);
}

.photo-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.photo-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.photo-card .photo-info {
    padding: 10px;
    background: var(--white);
}

.photo-card .photo-info .photo-type {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.photo-card .photo-info .photo-type.before {
    color: var(--warning);
}

.photo-card .photo-info .photo-type.after {
    color: var(--secondary);
}

.photo-card .photo-info .photo-date {
    font-size: 11px;
    color: var(--dark-3);
    margin-top: 3px;
}

/* ===== Activity Timeline ===== */
.timeline-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--light-2);
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}

.timeline-dot.blue { background: var(--primary); }
.timeline-dot.green { background: var(--secondary); }
.timeline-dot.yellow { background: var(--warning); }
.timeline-dot.red { background: var(--danger); }

.timeline-content {
    flex: 1;
}

.timeline-content .timeline-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
}

.timeline-content .timeline-time {
    font-size: 11px;
    color: var(--dark-3);
    margin-top: 2px;
}

/* ===== Employee Avatar ===== */
.employee-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.avatar-blue { background: linear-gradient(135deg, #2563EB, #3B82F6); }
.avatar-green { background: linear-gradient(135deg, #10B981, #34D399); }
.avatar-yellow { background: linear-gradient(135deg, #F59E0B, #FBBF24); }
.avatar-red { background: linear-gradient(135deg, #EF4444, #F87171); }
.avatar-cyan { background: linear-gradient(135deg, #06B6D4, #22D3EE); }
.avatar-purple { background: linear-gradient(135deg, #8B5CF6, #A78BFA); }

/* ===== Calculation Result ===== */
.calc-result {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
    border-radius: var(--radius);
    padding: 25px;
    color: white;
    text-align: center;
}

.calc-result .calc-total {
    font-size: 36px;
    font-weight: 800;
    margin: 10px 0;
}

.calc-result .calc-label {
    font-size: 13px;
    opacity: 0.7;
}

/* ===== Working Status ===== */
.working-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--secondary);
    position: relative;
}

.pulse-dot::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--secondary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 50px 20px;
}

.empty-state i {
    font-size: 50px;
    color: var(--light-3);
    margin-bottom: 15px;
}

.empty-state h5 {
    color: var(--dark-3);
    font-weight: 600;
}

.empty-state p {
    color: var(--dark-3);
    font-size: 13px;
}

/* ===== Responsive ===== */

/* ---- Sidebar Overlay (mobile) ---- */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 999;
    backdrop-filter: blur(2px);
    animation: fadeInOverlay 0.25s ease;
}
.sidebar-overlay.show {
    display: block;
}
@keyframes fadeInOverlay {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ---- Logout button in header (mobile only) ---- */
.header-logout-btn {
    display: none;
}

@media (max-width: 991px) {
    /* Sidebar slides off-screen by default */
    .sidebar {
        transform: translateX(-100%);
        z-index: 1000;
        box-shadow: 4px 0 20px rgba(0,0,0,0.3);
    }
    .sidebar.show {
        transform: translateX(0);
    }

    /* Header spans full width */
    .main-header {
        left: 0 !important;
        padding: 0 15px;
    }

    /* Content takes full width */
    .main-content {
        margin-left: 0 !important;
        padding-bottom: 70px; /* space for bottom nav */
    }

    /* Show logout in header on mobile */
    .header-logout-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        border-radius: var(--radius-sm);
        background: rgba(239, 68, 68, 0.1);
        color: var(--danger);
        border: none;
        cursor: pointer;
        transition: var(--transition);
        text-decoration: none;
        flex-shrink: 0;
    }
    .header-logout-btn:hover {
        background: var(--danger);
        color: white;
    }

    /* Stat cards stack 2 per row */
    .stat-card .stat-value {
        font-size: 22px;
    }

    /* Page header stacks */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Content padding smaller on phone */
    .content-wrapper {
        padding: 15px;
    }

    /* Tables scroll horizontally */
    .table-responsive-custom {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Cards full width */
    .card-custom .card-body-custom {
        padding: 15px;
    }

    /* Bigger tap targets for buttons */
    .btn-sm-action {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }

    /* Form inputs bigger on touch */
    .form-custom .form-control,
    .form-custom .form-select {
        padding: 12px 14px;
        font-size: 16px; /* prevents iOS zoom */
    }

    /* Login card smaller padding */
    .login-card {
        padding: 25px 20px;
    }

    /* Hide language toggle text on tiny screens */
    .lang-toggle a {
        padding: 6px 8px;
        font-size: 11px;
    }
}

/* ---- Mobile Bottom Navigation ---- */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 991px) {
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 62px;
        background: var(--dark);
        border-top: 1px solid rgba(255,255,255,0.08);
        z-index: 998;
        align-items: stretch;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
    }

    .mobile-bottom-nav a {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        color: rgba(255,255,255,0.45);
        font-size: 10px;
        font-weight: 600;
        text-decoration: none;
        transition: var(--transition);
        padding: 6px 2px;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-bottom-nav a i {
        font-size: 18px;
    }

    .mobile-bottom-nav a.active,
    .mobile-bottom-nav a:active {
        color: var(--primary);
    }

    .mobile-bottom-nav a.nav-logout {
        color: rgba(239, 68, 68, 0.7);
    }
    .mobile-bottom-nav a.nav-logout:active {
        color: var(--danger);
    }
}

/* Extra small phones */
@media (max-width: 400px) {
    .main-header {
        padding: 0 10px;
    }
    .header-left h4 {
        font-size: 15px;
    }
    .mobile-bottom-nav a span {
        display: none; /* icons only on tiny screens */
    }
    .mobile-bottom-nav a i {
        font-size: 20px;
    }
    .mobile-bottom-nav {
        height: 56px;
    }
    .main-content {
        padding-bottom: 56px;
    }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--light-3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-3);
}

/* ===== Print ===== */
@media print {
    .sidebar, .main-header {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
        padding-top: 0 !important;
    }
}