/* =========================================================
   1. GLOBAL VARIABLES & RESET
   ========================================================= */
:root {
    --primary-color: #587685; 
    --primary-light: #7a95a3; 
    --bg-main: #f0f2f5; 
    --text-dark: #222222;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 90px;
    
    /* Specific App Colors */
    --attention: #ef4444;
    --working: #f59e0b;
    --approved: #10b981;
    --victory-gold: #d4af37; 
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', system-ui, sans-serif; }
body { background-color: var(--bg-main); display: flex; height: 100vh; overflow: hidden; cursor: none; }

/* =========================================================
   2. SMART CURSOR (Optimized)
   ========================================================= */
a, button, input, select, textarea, .brand-card, .file-card, .asset-card, .software-card, .task-card, .victory-card, .sidebar-toggle, .checkbox-label { cursor: none; }

#cursor-dot, #cursor-ring { 
    position: fixed; top: 0; left: 0; pointer-events: none; z-index: 999999; 
    transform: translate(-50%, -50%); mix-blend-mode: difference; will-change: transform; 
}
#cursor-dot { width: 8px; height: 8px; background-color: white; border-radius: 50%; }
#cursor-ring { 
    width: 40px; height: 40px; border: 1px solid white; border-radius: 50%; 
    transition: width 0.2s cubic-bezier(0.16, 1, 0.3, 1), height 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s;
}

/* =========================================================
   3. SIDEBAR & LAYOUT
   ========================================================= */
.sidebar { width: var(--sidebar-width); background-color: white; padding: 25px; display: flex; flex-direction: column; margin: 15px; border-radius: 24px; box-shadow: 0 10px 30px rgba(0,0,0,0.04); transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1); overflow: hidden; z-index: 100; flex-shrink: 0; }
.sidebar.collapsed { width: var(--sidebar-collapsed-width); padding: 25px 15px; }
.sidebar.collapsed .nav-text, .sidebar.collapsed .menu-heading { display: none; }
.sidebar.collapsed .menu-item, .sidebar.collapsed .brand-logo { justify-content: center; }
.sidebar.collapsed .menu-item i { margin-right: 0; font-size: 1.5rem; }

.brand-logo { font-size: 1.1rem; font-weight: 700; color: var(--primary-color); margin-bottom: 30px; display: flex; align-items: center; gap: 12px; text-decoration: none; white-space: nowrap;}
.brand-logo img { height: 45px; flex-shrink: 0; }
.menu-heading { font-size: 0.7rem; text-transform: uppercase; color: #aaa; margin: 20px 15px 10px; font-weight: 800; letter-spacing: 1px; white-space: nowrap;}
.menu-item { display: flex; align-items: center; text-decoration: none; color: #64748b; padding: 12px 16px; margin-bottom: 4px; border-radius: 14px; transition: 0.3s; font-weight: 600; white-space: nowrap; }
.menu-item i { margin-right: 12px; font-size: 1.3rem; flex-shrink: 0; }
.menu-item.active { background-color: var(--primary-color); color: white; box-shadow: 0 8px 20px rgba(88, 118, 133, 0.25); }
.menu-item:hover:not(.active) { background-color: #f1f5f9; color: var(--primary-color); }

.main-content { flex: 1; padding: 30px 40px; overflow-y: auto; display: flex; flex-direction: column; transition: all 0.4s ease; position: relative; }
.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 35px; }
.header-left { display: flex; align-items: center; gap: 20px; }
.sidebar-toggle, .toggle-btn { background: white; border: none; color: var(--primary-color); font-size: 1.6rem; padding: 10px; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.sidebar-toggle:hover, .toggle-btn:hover { background: var(--bg-main); transform: scale(1.05); }

/* Buttons */
.btn-primary { background: var(--primary-color); color: white; border: none; padding: 16px 36px; border-radius: 50px; font-weight: 700; font-size: 1rem; display: flex; align-items: center; gap: 12px; transition: 0.3s; box-shadow: 0 6px 20px rgba(88, 118, 133, 0.25); }
.btn-primary:hover { background: var(--primary-light); transform: translateY(-3px); box-shadow: 0 10px 30px rgba(88, 118, 133, 0.35); }

/* =========================================================
   4. CARDS & GRIDS
   ========================================================= */
.section-title { color: var(--text-dark); margin-bottom: 20px; font-size: 1.2rem; margin-top: 10px; font-weight: 800;}
.brand-overview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 40px; }
.brand-card { background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%); color: white; padding: 25px; border-radius: 20px; height: 160px; display: flex; flex-direction: row; align-items: center; justify-content: space-between; box-shadow: 0 8px 20px rgba(88, 118, 133, 0.3); transition: 0.3s ease; overflow: hidden; }
.brand-card:hover { transform: translateY(-5px); box-shadow: 0 12px 25px rgba(88, 118, 133, 0.4); }
.brand-card-text h3 { font-size: 1.5rem; margin-bottom: 5px; font-weight: 800;}
.brand-card-text p { font-size: 0.9rem; opacity: 0.9; }
i.brand-card-icon { font-size: 6rem; opacity: 0.2; transition: 0.4s ease; transform: rotate(-10deg); margin-right: -15px; }
.brand-card:hover i.brand-card-icon { opacity: 0.9; transform: rotate(0deg) scale(1.05); }
img.brand-card-icon { height: 140px; width: 140px; object-fit: contain; object-position: right center; opacity: 0.35; margin-right: -10px; transition: 0.4s ease; }
.brand-card:hover img.brand-card-icon { opacity: 1; transform: scale(1.1); }

/* File & Asset Cards */
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; padding-bottom: 100px; }
.asset-card { background: white; border-radius: 20px; overflow: hidden; box-shadow: 0 8px 20px rgba(88, 118, 133, 0.1); transition: 0.3s; display: flex; flex-direction: column; border: 1px solid transparent; position: relative; }
.asset-card:hover { transform: translateY(-5px); box-shadow: 0 12px 25px rgba(88, 118, 133, 0.3); border-color: var(--primary-light);}
.preview-area { height: 180px; background: #f9f9f9; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.preview-area img { width: 100%; height: 100%; object-fit: cover; }
.preview-area .type-icon { font-size: 5rem; color: #ddd; } 
.asset-card.is-folder .preview-area { background: var(--primary-color); }
.asset-card.is-folder .type-icon { color: rgba(255,255,255,0.4); }
.info-area { padding: 15px; display: flex; justify-content: space-between; align-items: center; }
.info-area h3, .info-area h4 { font-size: 0.95rem; color: var(--text-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; max-width: 140px; }
.info-area p { font-size: 0.75rem; color: #888; }

/* Software Logins */
.software-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 25px; }
.software-card { background: white; border-radius: 24px; padding: 25px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); transition: 0.3s; border: 1px solid rgba(0,0,0,0.01); position: relative; }
.software-card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0,0,0,0.08); border-color: var(--primary-light); }
.add-card-btn { background: white; border: 2px dashed #cbd5e1; border-radius: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #94a3b8; gap: 15px; min-height: 200px; transition: 0.3s; font-weight: 700; }
.add-card-btn:hover { border-color: var(--primary-color); color: var(--primary-color); background: #f8fafc; transform: translateY(-5px); }

/* Victories */
.victory-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 25px; padding-bottom: 100px; }
.victory-card { background: white; border-radius: 16px; padding: 25px; border: 1px solid #e2e8ea; position: relative; display: flex; flex-direction: column; box-shadow: 0 4px 15px rgba(0,0,0,0.02); transition: 0.3s; cursor: none; overflow: hidden; }
.victory-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(245, 158, 11, 0.1); border-color: #fcd34d; }

/* =========================================================
   5. UTILITIES (Modals, Forms, FABs)
   ========================================================= */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); backdrop-filter: blur(5px); z-index: 2000; display: none; justify-content: center; align-items: center; }
.modal-card { background: white; padding: 40px; border-radius: 30px; width: 100%; max-width: 650px; box-shadow: 0 25px 50px rgba(0,0,0,0.15); max-height: 90vh; overflow-y: auto; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 700; color: #64748b; margin-bottom: 8px; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 14px; border-radius: 14px; border: 2px solid #f1f5f9; outline: none; transition: 0.2s; font-size: 0.95rem; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary-color); background: #f9fbfc; }

.fab-menu-container { position: fixed; bottom: 40px; right: 40px; display: flex; flex-direction: column-reverse; align-items: center; gap: 15px; z-index: 1000; }
.fab-main { width: 65px; height: 65px; background: var(--text-dark); color: white; border-radius: 50%; border: none; display: flex; justify-content: center; align-items: center; font-size: 2rem; box-shadow: 0 8px 25px rgba(0,0,0,0.2); transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); cursor: none;}
.fab-item { width: 50px; height: 50px; background: white; color: var(--text-dark); border-radius: 50%; border: none; display: flex; justify-content: center; align-items: center; font-size: 1.4rem; box-shadow: 0 4px 15px rgba(0,0,0,0.1); transition: 0.3s; opacity: 0; visibility: hidden; transform: translateY(20px); position: relative; cursor: none;}
.fab-menu-container.active .fab-main { transform: rotate(135deg); background: var(--primary-color); }
.fab-menu-container.active .fab-item { opacity: 1; visibility: visible; transform: translateY(0); }
.fab-item:hover { background: var(--bg-main); color: var(--primary-color); transform: scale(1.1) !important; }

/* Loaders */
.loader-container { grid-column: 1 / -1; display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 300px; color: #64748b; gap: 20px; }
.spinner { border: 4px solid rgba(88, 118, 133, 0.2); border-top: 4px solid var(--primary-color); border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; margin: 0 auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Login Portal Box */
.login-container { background: white; padding: 50px 40px; border-radius: 24px; box-shadow: 0 15px 35px rgba(0,0,0,0.05); width: 100%; max-width: 420px; text-align: center; }
.input-group { position: relative; margin-bottom: 20px; text-align: left; }
.input-group i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: #aaa; font-size: 1.2rem; }
.input-group input { width: 100%; padding: 16px 16px 16px 50px; border-radius: 12px; border: 2px solid #eee; outline: none; font-size: 1rem; transition: 0.3s; }
.input-group input:focus { border-color: var(--primary-color); }

/* =========================================================
   9. MOBILE NUCLEAR BLOCKER (CSS-BASED)
   ========================================================= */
@media (max-width: 1024px) {
    /* 1. Hide ALL App Elements Instantly */
    .sidebar, .main-content, .fab-menu-container, .modal-overlay, canvas, .login-card, .bg-shape-1, .bg-shape-2 {
        display: none !important;
    }

    /* 2. Show Full-Screen Warning Message */
    body::after {
        content: "🚫 Desktop Access Only \A \A This workspace is optimized for desktop productivity. \A Please open this link on your computer.";
        white-space: pre-wrap; /* Allows line breaks */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #f0f2f5;
        color: #587685;
        z-index: 2147483647; /* Maximum possible z-index */
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
        font-family: 'Segoe UI', system-ui, sans-serif;
        font-weight: 700;
        font-size: 1.2rem;
        padding: 40px;
        line-height: 1.6;
    }
    
    /* Lock scrolling */
    body {
        overflow: hidden !important;
        background: #f0f2f5 !important;
    }
}