/* === 1. GLOBAL VARIABLES & RESET === */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

:root {
    /* THEME: Stingless Bee (Cream, Honey, Dark Brown) */
    --bg-gradient: linear-gradient(135deg, #fffdf5 0%, #f0e6d2 100%);
    --glass-bg: rgba(255, 255, 255, 0.90);
    --glass-border: rgba(200, 150, 50, 0.2);
    
    --text-main: #3e2723; /* Dark Brown */
    --text-muted: #6d4c41; /* Lighter Brown */
    --accent: #ffb300;     /* Honey Gold */
    
    --card-bg: #ffffff;
    --input-bg: rgba(0, 0, 0, 0.05);
    --border-color: rgba(200, 150, 50, 0.2);
    
    /* FONTS */
    --font-main: 'Poppins', sans-serif;
    --font-zesty: 'Outfit', sans-serif;
    --font-mono: 'Roboto Mono', monospace;
    
    /* Sensor Colors */
    --color-temp: #ff7675;
    --color-hum: #0984e3;
    --color-weight: #e1b12c;
    --color-audio: #6c5ce7;
    --color-cam: #ff4757;
}

body {
    font-family: var(--font-main);
    background: var(--bg-gradient);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden; /* Desktop default */
    position: relative;
    line-height: 1.6;
}

/* IMPORTANT: Utilities */
.hidden { display: none !important; }

/* === 2. LANDING PAGE === */
.landing-bg-layer {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
    background: radial-gradient(circle at top, #fffdf5 0%, #f0e6d2 100%);
}

.landing-container {
    width: 100%; height: 100vh; overflow-y: auto; overflow-x: hidden; position: relative;
}

.landing-container .glass-panel {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 179, 0, 0.2);
    box-shadow: 0 10px 30px rgba(78, 52, 46, 0.05);
}

/* TYPOGRAPHY */
h1, h2, h3, h4 { font-family: var(--font-zesty); color: var(--text-main); }
.zesty-text {
    font-family: var(--font-zesty); font-weight: 800;
    background: linear-gradient(135deg, #ff8f00, #ffb300, #ff6f00);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(255, 143, 0, 0.2));
}
.brand-logo { font-family: var(--font-zesty); font-weight: 800; font-size: 24px; color: var(--text-main); display: flex; align-items: center; gap: 10px; }

/* BUTTONS */
.zesty-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: none; outline: none;
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: #fff !important; font-family: var(--font-zesty); font-weight: 900; font-size: 14px;
    text-transform: uppercase; letter-spacing: 1.2px; padding: 14px 30px; border-radius: 50px;
    cursor: pointer; box-shadow: 0 10px 20px -5px rgba(255, 152, 0, 0.5);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); transition: all 0.2s; text-decoration: none;
}
.zesty-btn:hover { transform: translateY(-4px); box-shadow: 0 15px 30px -5px rgba(255, 152, 0, 0.7); }
.zesty-btn.secondary { background: transparent; border: 2px solid #ff9800; color: #ff9800 !important; text-shadow: none; box-shadow: none; }
.zesty-btn.secondary:hover { background: #ff9800; color: white !important; }

/* SMALL BUTTON (DESKTOP DEFAULT) */
.small-zesty { 
    padding: 10px 20px; 
    font-size: 12px; 
    height: auto; 
    line-height: 1.2; 
}

/* RESOURCE BUTTONS */
.text-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: var(--text-main);
    padding: 10px 22px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 11px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-family: var(--font-zesty);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.text-link-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 179, 0, 0.3);
}
.text-link-btn i { transition: transform 0.3s ease; color: var(--accent); }
.text-link-btn:hover i { transform: rotate(15deg) scale(1.1); color: white; }

/* RESOURCE LIST STYLING */
.resource-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}
.resource-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(255, 179, 0, 0.15);
    border-color: var(--accent);
    background: #fffdf5;
}
.res-info h4 {
    margin: 0;
    font-size: 14px;
    color: var(--text-main);
    font-weight: 700;
    font-family: var(--font-zesty);
}
.res-info p {
    margin: 4px 0 0 0;
    font-size: 11px;
    color: var(--text-muted);
}
.res-icon {
    font-size: 20px;
    color: var(--accent);
    opacity: 0.8;
}

/* ANIMATIONS */
.landing-bee, .dashboard-bee { position: absolute; width: 6px; height: 6px; background: #3e2723; border-radius: 50%; pointer-events: none; }
.dashboard-bee { background: rgba(60, 40, 30, 0.5); }
@keyframes flyAround { 0% { transform: translate(0, 0) rotate(0deg); opacity: 0; } 10% { opacity: 1; } 50% { transform: translate(60px, -40px) rotate(45deg); } 100% { transform: translate(0, 0) rotate(360deg); opacity: 0; } }
.giant-floating-bee { font-size: 180px; filter: brightness(0.2) sepia(1) hue-rotate(15deg) saturate(5) drop-shadow(0 20px 30px rgba(78, 52, 46, 0.3)); animation: hoverBee 4s ease-in-out infinite; }
@keyframes hoverBee { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-15px); } }

/* NAV */
.public-nav { display: flex; justify-content: space-between; align-items: center; padding: 15px 40px; margin: 0 20px; position: sticky; top: 20px; z-index: 100; border-radius: 50px; background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(10px); border: 1px solid var(--border-color); }
.nav-links { display: flex; gap: 15px; }
.mobile-menu-btn { display: none; background: transparent; border: 1px solid var(--border-color); border-radius: 50%; width: 40px; height: 40px; cursor: pointer; color: var(--text-main); font-size: 18px; align-items: center; justify-content: center; }
.mobile-menu-dropdown { position: fixed; top: 80px; right: 20px; width: 200px; background: white; border: 1px solid var(--border-color); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); z-index: 101; display: flex; flex-direction: column; padding: 10px; }
.mobile-menu-dropdown button { background: none; border: none; text-align: left; padding: 12px; font-family: var(--font-zesty); font-weight: 600; color: var(--text-main); cursor: pointer; border-radius: 8px; }
.mobile-menu-dropdown button:hover { background: var(--input-bg); color: var(--accent); }

/* SECTIONS */
.hero-section { min-height: 90vh; display: flex; align-items: center; justify-content: space-between; padding: 0 80px; }
.hero-text h1 { font-size: 50px; line-height: 1.2; margin-bottom: 20px; font-weight: 700; }
.hero-text p { font-size: 18px; max-width: 500px; margin-bottom: 30px; color: #6d4c41; }
.info-section, .project-section { padding: 80px 80px; text-align: center; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.info-card { padding: 40px 30px; background: white; border: 1px solid var(--border-color); border-radius: 20px; text-align: left; box-shadow: 0 10px 30px rgba(78, 52, 46, 0.05); }
.card-icon { font-size: 32px; margin-bottom: 20px; color: var(--accent); }
.project-card { padding: 60px; text-align: left; max-width: 1000px; margin: 0 auto; background: white; border-radius: 20px; border: 1px solid var(--border-color); box-shadow: 0 10px 40px rgba(0,0,0,0.05); }
.tag { background: rgba(255, 179, 0, 0.1); padding: 5px 10px; border-radius: 4px; font-size: 12px; font-weight: 700; color: #e65100; text-transform: uppercase; font-family: var(--font-zesty); }
.abstract-box { background: #fff8e1; border-left: 4px solid #ffb300; padding: 20px; margin: 30px 0; font-style: italic; color: #5d4037; font-size: 15px; border-radius: 0 10px 10px 0; }
.project-actions { margin: 30px 0; display: flex; gap: 15px; }
.collaboration-footer { margin-top: 60px; padding-top: 30px; border-top: 1px solid rgba(0,0,0,0.1); text-align: center; }
.back-home-btn { position: absolute; top: 20px; left: 20px; background: transparent; border: none; color: #6d4c41; cursor: pointer; z-index: 10; font-weight: bold; }

/* LOGIN */
.login-container { display: flex; justify-content: center; align-items: center; height: 100vh; padding: 20px; }
.login-card { width: 100%; max-width: 350px; padding: 40px 20px; text-align: center; border: 1px solid var(--border-color); background: var(--glass-bg); border-radius: 20px; box-shadow: 0 10px 40px rgba(0,0,0,0.05); }
.input-group { background: rgba(0, 0, 0, 0.05); border-radius: 10px; padding: 12px; margin-bottom: 15px; display: flex; align-items: center; }
.input-group input { background: transparent; border: none; outline: none; color: var(--text-main); width: 100%; font-family: var(--font-main); }
.login-btn { width: 100%; margin-top: 10px; }

/* DASHBOARD */
.dashboard-container { display: flex; min-height: 100vh; }
.sidebar { width: 260px; margin: 20px; display: flex; flex-direction: column; padding: 20px; background: var(--glass-bg); border-radius: 20px; border: 1px solid var(--border-color); position: sticky; top: 20px; height: calc(100vh - 40px); }
.clickable-profile { display: flex; align-items: center; gap: 10px; margin-bottom: 30px; padding: 10px; border: 1px solid transparent; border-radius: 12px; cursor: pointer; transition: 0.2s; }
.clickable-profile:hover { background: rgba(255, 255, 255, 0.5); border-color: var(--glass-border); }
.user-avatar img { width: 45px; height: 45px; border-radius: 50%; border: 2px solid var(--accent); object-fit: cover; }
.user-info { display: flex; flex-direction: column; justify-content: center; }
.sidebar li { padding: 15px; margin: 5px 0; border-radius: 12px; cursor: pointer; color: var(--text-muted); display: flex; gap: 15px; font-weight: 500; align-items: center; }
.sidebar li:hover, .sidebar li.active { background: rgba(255, 255, 255, 0.5); color: var(--accent); font-weight: 700; }

.main-content { flex: 1; padding: 20px 40px; position: relative; max-width: 1400px; margin: 0 auto; }
header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.action-btn { background: transparent; border: 1px solid var(--border-color); padding: 10px; border-radius: 50%; color: var(--text-muted); cursor: pointer; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }
.mobile-only-btn { display: none; background: transparent; border: 1px solid var(--border-color); padding: 10px; border-radius: 50%; color: var(--text-muted); cursor: pointer; width: 40px; height: 40px; align-items: center; justify-content: center; }
.mobile-label { display: none; }

/* CARDS */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 20px; }
.stat-card { padding: 20px; display: flex; align-items: center; gap: 15px; position: relative; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 20px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); transition: 0.3s; cursor: pointer; }
.stat-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.icon-box { width: 55px; height: 55px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; color: white; }
.card-temp .icon-box { background: linear-gradient(135deg, #ff9966, #ff5e62); }
.card-hum .icon-box { background: linear-gradient(135deg, #56ccf2, #2f80ed); }
.card-weight .icon-box { background: linear-gradient(135deg, #f1c40f, #f39c12); }
.card-audio .icon-box { background: linear-gradient(135deg, #a29bfe, #6c5ce7); }
.card-cam .icon-box { background: linear-gradient(135deg, #FF416C, #FF4B2B); }
.stat-info h3 { margin: 0; font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.stat-info p { margin: 2px 0; font-size: 24px; font-weight: 700; color: var(--text-main); }
.badge { font-size: 10px; background: rgba(0,0,0,0.05); padding: 3px 8px; border-radius: 10px; color: var(--text-muted); }
.card-arrow { position: absolute; right: 20px; opacity: 0; transition: 0.3s; color: var(--text-muted); }
.stat-card:hover .card-arrow { opacity: 1; transform: translateX(5px); }

/* CHARTS & LOGS */
.chart-wrapper { padding: 20px; height: 350px; background: var(--glass-bg); border: 1px solid var(--border-color); border-radius: 20px; }
.blink-red { color: #ff5e62; animation: pulse-red 1s infinite; }
.blink { width: 8px; height: 8px; background: #ff5e62; border-radius: 50%; display: inline-block; animation: pulse-red 1s infinite; margin-right: 5px; }

/* TABLE (DEFAULT DESKTOP) */
.table-responsive { overflow-x: auto; }
#logs-table { width: 100%; border-collapse: separate; border-spacing: 0 10px; margin-top: 10px; }
#logs-table th { text-align: left; color: var(--text-muted); font-size: 12px; font-weight: 600; text-transform: uppercase; padding: 10px 20px; }
#logs-table td { background: var(--card-bg); padding: 15px 20px; font-size: 14px; border: 1px solid var(--border-color); color: var(--text-main); }
#logs-table tr td:first-child { border-top-left-radius: 15px; border-bottom-left-radius: 15px; border-right: none; color: var(--accent); font-weight: bold; font-family: monospace; }
#logs-table tr td:last-child { border-top-right-radius: 15px; border-bottom-right-radius: 15px; border-left: none; }
.log-badge { padding: 6px 14px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; display: inline-block; min-width: 80px; text-align: center; }
.badge-normal { background: rgba(46, 204, 113, 0.2); color: #2ecc71; }
.badge-warning { background: rgba(255, 71, 87, 0.2); color: #ff4757; }
.conf-text { font-family: var(--font-mono); font-weight: bold; }

/* ADMIN & SETTINGS */
.pro-card { background: var(--glass-bg); border: 1px solid var(--border-color); border-radius: 20px; padding: 30px; box-shadow: 0 5px 20px rgba(0,0,0,0.03); margin-bottom: 20px; }
.pro-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; padding-bottom: 15px; border-bottom: 1px solid var(--border-color); }
.pro-header h3 { margin: 0; font-size: 18px; color: var(--text-main); font-weight: 700; display: flex; align-items: center; gap: 10px; font-family: var(--font-zesty); }
.badge-id { background: var(--accent); color: #222; padding: 4px 8px; border-radius: 4px; font-weight: bold; font-size: 12px; }
.profile-layout { display: flex; gap: 40px; align-items: flex-start; }
.avatar-section { flex: 0 0 150px; text-align: center; }
.avatar-preview { width: 120px; height: 120px; border-radius: 20px; background: rgba(0,0,0,0.05); object-fit: cover; border: 2px solid var(--border-color); margin-bottom: 15px; }
.btn-upload { border: 1px solid var(--border-color); color: var(--text-main); background-color: white; padding: 8px 15px; border-radius: 10px; font-size: 12px; font-weight: 600; cursor: pointer; transition: 0.2s; font-family: var(--font-zesty); }
.upload-btn-wrapper input[type=file] { font-size: 100px; position: absolute; left: 0; top: 0; opacity: 0; cursor: pointer; }
.form-section { flex: 1; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; }
.pro-input { width: 100%; padding: 12px; border: 1px solid var(--border-color); border-radius: 10px; background: rgba(0,0,0,0.05); font-family: var(--font-main); font-size: 14px; transition: 0.2s; box-sizing: border-box; }
.full-width-btn { width: 100%; padding: 15px; background: linear-gradient(135deg, #ffc107, #ff9800); color: white; border: none; border-radius: 10px; font-weight: 700; cursor: pointer; transition: 0.2s; font-family: var(--font-zesty); }

/* SETTINGS & MODALS */
.settings-grid { display: grid; gap: 20px; }
.setting-item { display: flex; justify-content: space-between; align-items: center; padding: 20px; background: rgba(0,0,0,0.03); border-radius: 15px; }
.setting-info h4 { margin: 0 0 5px 0; font-size: 15px; color: var(--text-main); font-family: var(--font-zesty); }
.switch { position: relative; display: inline-block; width: 50px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--accent); }
input:checked + .slider:before { transform: translateX(24px); }

/* MODALS */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); z-index: 1000; display: flex; justify-content: center; align-items: center; backdrop-filter: blur(5px); }
.modal-content { width: 800px; height: 500px; padding: 20px; position: relative; display: flex; flex-direction: column; background: var(--glass-bg); border-radius: 20px; box-shadow: 0 20px 50px rgba(0,0,0,0.1); border: 1px solid var(--border-color); }
.close-modal { position: absolute; top: 15px; right: 15px; background: rgba(0,0,0,0.05); border: none; color: var(--text-muted); font-size: 18px; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.video-layout { display: flex; height: 100%; gap: 15px; margin-top: 15px; }
.video-player { flex: 2; background: black; border-radius: 15px; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.video-logs { flex: 1; display: flex; flex-direction: column; }
.log-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; }
.log-item { padding: 10px; background: rgba(0,0,0,0.03); border-radius: 8px; font-size: 13px; cursor: pointer; border: 1px solid transparent; }
.detailed-modal-content { background: #ffffff; width: 700px; height: 500px; padding: 30px; display: flex; flex-direction: column; border-radius: 16px; position: relative; }
.detailed-graph-container { flex: 1; display: flex; flex-direction: column; }
.canvas-container-detailed { flex: 1; position: relative; background: #fdfdfd; border-radius: 12px; border: 1px solid #f1f2f6; padding: 10px; }
.graph-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-top: 15px; }
.stat-box { background: #f8f9fa; padding: 15px; border-radius: 10px; text-align: center; }
.stat-box span { font-size: 11px; color: var(--text-muted); text-transform: uppercase; }
.stat-box strong { font-size: 20px; font-family: var(--font-mono); }

/* ALERT */
.alert-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(10px); z-index: 3000; display: flex; justify-content: center; align-items: center; animation: fadeInAlert 0.3s ease-out; }
.alert-modal-content { width: 90%; max-width: 450px; padding: 40px; text-align: center; background: white; border: 3px solid #ff4757; border-radius: 20px; box-shadow: 0 0 0 10px rgba(255, 71, 87, 0.2), 0 30px 80px rgba(0,0,0,0.5); animation: bounceInAlert 0.5s; }
.alert-icon { font-size: 60px; color: #ff4757; animation: pulse-large 1s infinite; display: block; margin-bottom: 15px; }
.alert-actions { display: flex; gap: 15px; justify-content: center; }
.alert-close-btn, .alert-view-btn { padding: 12px 25px; border: none; border-radius: 8px; font-size: 14px; font-weight: bold; cursor: pointer; text-transform: uppercase; font-family: var(--font-zesty); }
.alert-close-btn { background: #2ecc71; color: white; }
.alert-view-btn { background: #f1c40f; color: #2d3436; }
.alert-notification { position: fixed; top: 20px; right: 20px; background: #ff4757; color: white; padding: 15px 25px; border-radius: 12px; z-index: 4000; display: flex; align-items: center; gap: 12px; animation: slideInAlert 0.3s; }

/* AUDIO GRAPH */
.spectrogram-display { flex: 1; background: #000000; border-radius: 12px; border: 1px solid var(--glass-border); position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.spectrogram-display canvas { width: 100%; height: 100%; display: block; }
.audio-controls { margin-top: 15px; padding: 12px; background: rgba(0, 0, 0, 0.03); border-radius: 8px; text-align: center; font-weight: 600; color: var(--text-main); font-family: var(--font-mono); }

@keyframes fadeInAlert { from { opacity: 0; } to { opacity: 1; } }
@keyframes bounceInAlert { 0% { transform: scale(0.5); opacity: 0; } 60% { transform: scale(1.1); } 100% { transform: scale(1); opacity: 1; } }
@keyframes pulse-large { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }
@keyframes slideInAlert { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* =========================================
   MOBILE OPTIMIZATIONS (FIXED SCROLL, TABLE & LOGOUT)
   ========================================= */
@media (max-width: 768px) {
    /* 1. FORCE NATURAL SCROLLING */
    body, html {
        overflow-y: auto !important;
        height: auto !important;
        position: static !important;
    }
    
    .dashboard-container {
        /* FIX: Remove !important here so .hidden can take effect */
        display: block; 
        height: auto !important;
        overflow: visible !important;
    }

    /* FIX: ENSURE HIDDEN DASHBOARD & NAV STAY HIDDEN ON LOGOUT */
    .hidden, .dashboard-container.hidden, .mobile-nav.hidden { 
        display: none !important; 
    }

    /* 2. SAFE AREA & MARGINS */
    .main-content {
        height: auto !important;
        overflow: visible !important;
        padding: 20px 20px 150px 20px;
        display: block !important;
    }

    /* 3. NAMED BUTTONS FOR MOBILE */
    .mobile-only-btn, .action-btn {
        width: auto !important;
        border-radius: 50px !important; /* Pill shape */
        padding: 8px 12px !important;
        gap: 6px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        margin: 0 2px; /* FIX: Added Margin */
    }

    .mobile-label {
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        display: inline-block !important; /* Make visible */
        color: var(--text-muted);
    }

    /* FIX: Header Actions Padding so buttons don't get cut off */
    .header-actions {
        gap: 0; 
        padding-right: 15px; /* Added Safe Padding on Right */
    }

    /* 4. TRANSFORM TABLE TO CARDS */
    #logs-table thead { display: none; }
    
    #logs-table, #logs-table tbody, #logs-table tr, #logs-table td {
        display: block; width: 100%;
    }
    
    #logs-table tr {
        margin-bottom: 15px;
        background: white;
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 15px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    }
    
    #logs-table td {
        text-align: right;
        padding: 8px 0;
        border: none;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        position: relative;
        padding-left: 50%;
        font-size: 13px;
        border-radius: 0 !important;
    }

    #logs-table td:nth-of-type(1)::before { content: "Time"; position: absolute; left: 0; font-weight: bold; color: var(--text-muted); }
    #logs-table td:nth-of-type(2)::before { content: "Event"; position: absolute; left: 0; font-weight: bold; color: var(--text-muted); }
    #logs-table td:nth-of-type(3)::before { content: "Confidence"; position: absolute; left: 0; font-weight: bold; color: var(--text-muted); }
    #logs-table td:nth-of-type(4)::before { content: "Status"; position: absolute; left: 0; font-weight: bold; color: var(--text-muted); }
    
    #logs-table td:last-child { border-bottom: none; }

    /* 5. OTHER MOBILE FIXES */
    .sidebar { display: none; }
    .public-nav { padding: 15px 20px; }
    .nav-links { display: none; }
    .mobile-menu-btn { display: flex; }
    .desktop-actions { display: none !important; }
    .mobile-only-btn { display: flex !important; }

    .hero-section { flex-direction: column-reverse; padding: 60px 20px; text-align: center; }
    .hero-text h1 { font-size: 32px; }
    .giant-floating-bee { font-size: 120px; }
    .project-actions { flex-direction: column; }
    
    /* Mobile Nav Bar Styles (Only visible when NOT hidden) */
    .mobile-nav { 
        display: flex; 
        position: fixed; 
        bottom: 20px; 
        left: 20px; 
        right: 20px; 
        height: 60px; 
        justify-content: space-around; 
        align-items: center; 
        z-index: 999; 
        background: white; 
        border: 1px solid var(--border-color); 
        border-radius: 30px; 
        box-shadow: 0 10px 30px rgba(0,0,0,0.1); 
    }
    
    .mobile-nav div { font-size: 18px; color: var(--text-muted); padding: 10px; opacity: 0.5; }
    .mobile-nav div.active { color: var(--accent); opacity: 1; transform: translateY(-2px); }
    .nav-mini-img { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--accent); }

    .modal-content { width: 90%; height: auto; max-height: 85vh; padding: 20px; overflow-y: auto; }
    .detailed-modal-content { width: 95vw; height: auto; padding: 20px; }
    
    .cards-grid { grid-template-columns: 1fr; gap: 15px; margin-bottom: 25px; }
    .stat-card { padding: 20px; flex-direction: row; justify-content: flex-start; text-align: left; }
    .stat-info { margin-left: 10px; }
    .card-arrow { display: block; opacity: 0.5; }
    
    .pro-card { width: 100%; margin: 0 0 30px 0 !important; }
    .chart-wrapper { margin-bottom: 25px; }

    .hero-section, .info-section, .project-section { padding: 50px 20px; }
    .info-card, .project-card { padding: 25px; margin-bottom: 15px; }

    .profile-layout { flex-direction: column; align-items: center; gap: 30px; }
    .avatar-section { flex: none; width: 100%; display: flex; flex-direction: column; align-items: center; margin-bottom: 10px; }
    .form-section { width: 100%; }
    .form-grid { grid-template-columns: 1fr; gap: 15px; }
    .form-group { margin-bottom: 15px; }

    .small-zesty { padding: 6px 12px !important; font-size: 10px !important; }
}