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

:root {
    --primary: #009ca6; /* Matched to IPLA logo teal */
    --secondary: #607d8b;
    --accent: #ff4081;
    --bg-dark: #0a0c10;
    --card-bg: rgba(22, 28, 36, 0.6);
    --sidebar-bg: #11141d;
    --text: #e1e7ef;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.08);
}

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

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(0, 210, 255, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(157, 80, 187, 0.05) 0px, transparent 50%);
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    height: 100vh;
    overflow: hidden;
}

.dashboard {
    display: flex;
    height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    z-index: 10;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

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

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.sidebar h1 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    letter-spacing: 1px;
}

.sidebar h1 i {
    color: var(--primary);
    filter: drop-shadow(0 0 10px rgba(0, 210, 255, 0.4));
}

.nav-link {
    padding: 0.85rem 1.25rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-link i { font-size: 1.1rem; }

.nav-link:hover {
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    transform: translateX(5px);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.2);
}

/* Widgets in Sidebar */
.sidebar-widgets {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.widget-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

.widget-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.clock-widget h2 { font-size: 1.5rem; font-weight: 700; color: #fff; margin-bottom: 0.2rem; }
.clock-widget p { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

.weather-widget { display: flex; align-items: center; gap: 0.75rem; }
.weather-temp { font-size: 1.4rem; font-weight: 600; color: #fff; }
.weather-info { font-size: 0.8rem; color: var(--text-muted); line-height: 1.2; }
.weather-icon { font-size: 1.8rem; color: var(--primary); }

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    position: relative;
}

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

/* Modern Input */
.search-inner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 450px;
}

.search-inner i {
    position: static;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.search-inner input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 0.85rem 1rem;
    border-radius: 14px;
    color: #fff;
    width: 100%;
    transition: all 0.3s;
    font-family: inherit;
}

.search-inner input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 210, 255, 0.1);
}

.search-inner {
    display: flex;
    align-items: center;
}

.search-inner i {
    position: absolute;
    left: 1.2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

/* Beautiful Cards */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    padding: 0;
    overflow: hidden;
}

/* Advanced Stats Engine */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    margin-top: 1rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 1.75rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    color: #fff;
}

.stat-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at center, rgba(0, 156, 166, 0.1), transparent 60%);
    opacity: 0.5;
    pointer-events: none;
}

.stat-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary);
    flex-shrink: 0;
    box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.01);
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 2.4rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    margin-bottom: 2px;
    letter-spacing: -1.5px;
}

.stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.table-container { padding: 0.5rem; }

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 4px; /* Reduced vertical gap for better continuity */
    table-layout: auto;
}

th {
    padding: 1.25rem 1rem;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border);
}

th:first-child { border-radius: 12px 0 0 12px; }
th:last-child { border-radius: 0 12px 12px 0; }

td {
    padding: 1.2rem 1rem;
    background: rgba(255, 255, 255, 0.015);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
    vertical-align: middle;
    font-size: 0.9rem;
}

td:first-child { 
    border-left: 1px solid var(--border); 
    border-radius: 16px 0 0 16px; 
    font-weight: 700;
    color: #fff;
}

td:last-child { 
    border-right: 1px solid var(--border); 
    border-radius: 0 16px 16px 0;
    text-align: right;
}

tr {
    transition: all 0.3s ease;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(0, 156, 166, 0.3);
    transform: scale(1.002);
    z-index: 1;
}

/* Professional Buttons */
.btn {
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 0.85rem;
    text-decoration: none;
    color: #fff;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #00d2ff);
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.3);
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border);
}

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

/* Action Buttons in Table */
.action-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.action-btn-edit:hover { color: #ffc107; border-color: #ffc107; }
.action-btn-history:hover { color: #00d2ff; border-color: #00d2ff; }

/* File Action Buttons */
.file-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 0.85rem;
}

.file-action-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(0, 156, 166, 0.4);
}

.file-action-btn i {
    transition: transform 0.2s;
}

.file-action-btn:hover i {
    transform: rotate(-15deg);
}

.file-action-btn.forward {
    background: rgba(162, 0, 255, 0.1);
    border-color: rgba(162, 0, 255, 0.2);
    color: #c370ff;
}

.file-action-btn.forward:hover {
    background: #c370ff;
    color: #fff;
    box-shadow: 0 0 10px rgba(162, 0, 255, 0.4);
}

/* Badges Modern */
.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid transparent;
}

.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.badge-in { 
    background: rgba(0, 210, 255, 0.1); 
    color: #00d2ff; 
    border-color: rgba(0, 210, 255, 0.2);
}
.badge-in::before { background: #00d2ff; box-shadow: 0 0 8px #00d2ff; }

.badge-out { 
    background: rgba(162, 0, 255, 0.1); 
    color: #c370ff; 
    border-color: rgba(162, 0, 255, 0.2);
}
.badge-out::before { background: #c370ff; box-shadow: 0 0 8px #c370ff; }

/* File List Modern */
.file-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.file-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.file-link {
    color: var(--text);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.6rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.2s;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-link:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--primary);
    color: var(--primary);
}

.file-link i {
    color: var(--primary);
    font-size: 1rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* Modal Styles */
.modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.9); backdrop-filter: blur(12px);
    display: flex; align-items: flex-start; justify-content: center;
    opacity: 0; pointer-events: none; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000; padding: 1.5rem 1rem; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.modal.active { opacity: 1; pointer-events: all; }
.modal-content {
    background: #161c24;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2.5rem;
    width: 100%;
    max-width: 650px;
    position: relative;
    margin-top: 5vh;
    margin-bottom: 5vh;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

input[type="text"], 
input[type="password"], 
input[type="email"], 
input[type="number"],
input[type="date"],
input[type="url"],
select, 
textarea {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 0.85rem 1.25rem;
    border-radius: 14px;
    color: #fff;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    color-scheme: dark;
    caret-color: #fff;
}

input[type="text"], 
input[type="password"], 
input[type="email"], 
input[type="number"],
input[type="date"],
select, 
textarea,
button {
    font-family: inherit;
}

button {
    appearance: none;
    background: none;
    border: none;
    cursor: pointer;
}
select option {
    background-color: #1a1c23 !important;
    color: #ffffff !important;
}

input:hover, select:hover, textarea:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

input:focus, select:focus, textarea:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 156, 166, 0.15);
    transform: translateY(-1px);
}

/* Fix autofill browser che forza testo nero */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-text-fill-color: #fff !important;
    -webkit-box-shadow: 0 0 0 1000px rgba(255,255,255,0.04) inset !important;
    caret-color: #fff;
    transition: background-color 9999s ease-out;
}

/* Fix per icona calendario scura su sfondo scuro */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.7;
    cursor: pointer;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}
.search-inner input {
    padding-left: 3rem;
}
.minimal-select { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.06); color: #fff; padding: 0.6rem 1rem; border-radius: 12px; font-size: 0.8rem; outline: none; transition: 0.3s; cursor: pointer; }
.minimal-select:hover { border-color: var(--primary); background: rgba(255,255,255,0.05); }
.minimal-btn { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.06); color: var(--text-muted); padding: 0.6rem 1.2rem; border-radius: 12px; font-size: 0.75rem; font-weight: 700; text-decoration: none; transition: 0.3s; }
.minimal-btn:hover { background: rgba(255,255,255,0.06); color: #fff; border-color: var(--primary); }
.minimal-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(0, 156, 166, 0.3); }
.password-container {
    position: relative;
    width: 100%;
}

.password-container input {
    padding-right: 3.5rem;
}

.toggle-password {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.3s;
    font-size: 1.1rem;
    z-index: 10;
}

.toggle-password:hover {
    color: var(--primary);
}

::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ======================================================
   RESPONSIVE & PWA HARDENING (Web App Interface)
   ====================================================== */
.mobile-header, .mobile-nav, .fab, .sidebar-overlay, .mobile-only {
    display: none !important;
}

/* Media scroll handled globally in .table-container */

@media (max-width: 900px) {
    body {
        overflow-y: auto !important;
        height: auto !important;
        padding-bottom: 90px !important;
    }

    .dashboard {
        flex-direction: column;
        height: auto;
    }

    /* Off-canvas Sidebar */
    .sidebar {
        position: fixed !important;
        right: -300px !important;
        left: auto !important;
        top: 0;
        bottom: 0;
        width: 280px !important;
        height: 100dvh !important;
        z-index: 5000 !important;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        background: rgba(17, 20, 29, 0.9) !important; 
        backdrop-filter: blur(15px);
        display: flex !important;
        flex-direction: column !important;
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
        overflow-y: auto !important;
        padding-bottom: 120px !important; /* Extra space for bottom nav and safe area */
    }

    .dashboard.sidebar-active .sidebar {
        transform: translateX(-300px) !important;
    }

    .mobile-header {
        display: flex !important;
        position: fixed;
        top: 0; left: 0; right: 0;
        height: 65px;
        background: rgba(10, 12, 16, 0.95);
        backdrop-filter: blur(15px);
        border-bottom: 1px solid var(--border);
        z-index: 2000;
        align-items: center;
        padding: 0 1.25rem;
        justify-content: space-between;
    }

    .mobile-nav {
        display: flex !important;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        height: 75px;
        background: rgba(17, 20, 29, 0.98);
        backdrop-filter: blur(20px);
        border-top: 1px solid var(--border);
        z-index: 3000;
        justify-content: space-around;
        align-items: center;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .fab {
        display: flex !important;
        position: fixed;
        bottom: 95px;
        right: 20px;
        width: 60px;
        height: 60px;
        background: linear-gradient(135deg, var(--primary), #00d2ff);
        color: #fff;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        box-shadow: 0 10px 25px rgba(0, 210, 255, 0.4);
        z-index: 2500;
        border: none;
        cursor: pointer;
        transition: transform 0.2s;
    }

    .mobile-only { display: block !important; }

    .sidebar-overlay {
        display: none !important;
        position: fixed !important;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.7);
        backdrop-filter: blur(5px);
        z-index: 4500 !important;
    }

    .dashboard.sidebar-active .sidebar-overlay {
        display: block !important;
    }

    .main-content {
        padding: 1.25rem !important;
        margin-top: 65px !important;
        flex: none !important;
    }
    
    .header { margin-bottom: 2rem !important; }
    .header h2 { font-size: 1.3rem; }

    .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        color: var(--text-muted);
        text-decoration: none;
        font-size: 0.65rem;
        gap: 4px;
        transition: all 0.3s;
    }

    .nav-item i { font-size: 1.4rem; }
    .nav-item.active { color: var(--primary); }

    .fab:active { transform: scale(0.9); }

    /* CORE REDESIGN: TABLE TO CARDS */
    .table-container { 
        background: transparent !important; 
        border: none !important; 
        padding: 0 !important;
        overflow-x: visible !important;
    }

    table, thead, tbody, th, td, tr { 
        display: block; 
    }

    thead tr { 
        position: absolute; 
        top: -9999px; 
        left: -9999px; 
    }

    tr {
        background: rgba(22, 28, 36, 0.95) !important;
        backdrop-filter: blur(12px);
        border: 1px solid rgba(0, 156, 166, 0.2) !important;
        border-radius: 12px !important;
        margin-bottom: 2rem !important;
        padding: 1rem 0.5rem !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    }

    td {
        border-bottom: 1px solid rgba(255, 255, 255, 0.03) !important;
        position: relative;
        padding: 0.75rem 0.5rem 0.75rem 40% !important;
        text-align: right !important;
        min-height: 2.5rem;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    td:last-child { border-bottom: none !important; }

    td:before {
        position: absolute;
        left: 10px;
        width: 35%;
        text-align: left;
        font-weight: 700;
        font-size: 0.65rem;
        text-transform: uppercase;
        color: var(--primary);
        letter-spacing: 1px;
    }

    /* Labels for index.php */
    .table-container table td:nth-of-type(1):before { content: "ID / ANNO"; }
    .table-container table td:nth-of-type(2):before { content: "DATA"; }
    .table-container table td:nth-of-type(3):before { content: "TIPO"; }
    .table-container table td:nth-of-type(4):before { content: "OGGETTO"; }
    .table-container table td:nth-of-type(5):before { content: "NOTE"; }
    .table-container table td:nth-of-type(6):before { content: "ALLEGATI"; }
    .table-container table td:nth-of-type(7):before { content: "UTENTE"; }
    
    /* Labels for users.php */
    .user-table td:nth-of-type(1):before { content: "NOME"; }
    .user-table td:nth-of-type(2):before { content: "COGNOME"; }
    .user-table td:nth-of-type(3):before { content: "EMAIL"; }
    .user-table td:nth-of-type(4):before { content: "INIZIALI"; }
    .user-table td:nth-of-type(5):before { content: "RUOLO"; }
    .user-table td:nth-of-type(6):before { content: "STATO"; }
    .user-table td:nth-of-type(7):before { content: "AZIONI"; }

    /* Responsive Fixes */
    .stats-grid { grid-template-columns: 1fr !important; gap: 1rem !important; }
    .modal-content:not(.modal-viewer) { width: 98% !important; padding: 1.5rem !important; border-radius: 20px !important; }
    input, select, textarea { font-size: 16px !important; } /* Prevents iOS auto-zoom */

    /* Login Page Optimization */
    .login-card {
        padding: 2rem !important;
        border-radius: 0 !important;
        height: 100vh;
        max-width: 100% !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .logo-box img {
        width: 120px !important;
    }
}

/* Notifications & Animations */
.pulse-nav {
    position: relative;
    color: #fff !important;
    background: rgba(0, 156, 166, 0.15) !important;
    animation: pulseNav 2s infinite;
}

@keyframes pulseNav {
    0% { box-shadow: 0 0 0 0 rgba(0, 156, 166, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(0, 156, 166, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 156, 166, 0); }
}

.pulse-nav::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: #ffc107;
    border-radius: 50%;
    box-shadow: 0 0 10px #ffc107;
}
