/* ============================================
   INFORGRAFT DRIVE - Professional Style System
   ============================================ */

/* --- CSS Variables --- */
:root {
    --primary-color: #4285F4;
    --accent-green: #2ecc71;
    --brand-dark: #2c3e50;
    --bg-color: #F7F9FA;
    --sidebar-bg: #FFFFFF;
    --text-primary: #1E1919;
    --text-secondary: #636b74;
    --border-color: #E6E8EA;
    --hover-color: #F2F5FA;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* --- Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- Login Screen --- */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: var(--bg-color);
}

.login-box {
    background: var(--white);
    padding: 45px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.95rem;
    margin-bottom: 15px;
    outline: none;
    transition: border-color 0.2s;
    background: #f8fafc;
    color: var(--text-primary);
}

.login-input:focus {
    border-color: var(--accent-green);
    background: var(--white);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--accent-green);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: #27ae60;
    transform: translateY(-1px);
}

/* --- Brand --- */
.brand {
    display: flex;
    align-items: center;
}

.brand-logo img {
    display: block;
}

/* --- Sidebar --- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    padding: 30px 20px;
    z-index: 1000;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-item i {
    width: 22px;
    margin-right: 12px;
    text-align: center;
    font-size: 0.95rem;
}

.nav-item:hover {
    background: var(--hover-color);
    color: var(--primary-color);
}

.nav-item.active {
    background: #eef7ee;
    color: var(--accent-green);
    font-weight: 600;
}

.storage-info {
    margin-top: 30px;
    padding: 15px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.quota-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #999;
}

/* --- Main Content --- */
.main-content {
    margin-left: 280px;
    min-height: 100vh;
    background: var(--bg-color);
}

.top-bar {
    display: flex;
    align-items: center;
    padding: 15px 30px;
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 500;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-secondary);
    cursor: pointer;
    margin-right: 15px;
    padding: 5px;
}

.search-bar {
    display: flex;
    align-items: center;
    background: var(--bg-color);
    border-radius: 10px;
    padding: 10px 16px;
    flex: 1;
    max-width: 500px;
}

.search-bar input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-name {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--accent-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
}

/* --- Content Area --- */
.content-area {
    padding: 25px 30px;
}

.section-title {
    font-size: 0.75rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    margin-top: 25px;
    font-weight: 600;
}

/* --- Folder Grid --- */
.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.folder-card {
    background: var(--white);
    border-radius: 12px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border-color);
    position: relative;
}

.folder-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.folder-icon {
    font-size: 2rem;
    color: #f0c14b;
    margin-bottom: 10px;
}

.folder-name {
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-primary);
    word-break: break-word;
}

/* --- File Grid --- */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
}

.file-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border-color);
    position: relative;
}

.file-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.file-icon {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    font-size: 2.5rem;
    color: #bbb;
}

.file-name {
    padding: 12px 12px 4px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    padding: 0 12px 12px;
    font-size: 0.7rem;
    color: #999;
}

/* --- Delete Button on Cards --- */
.delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #e74c3c;
    font-size: 0.75rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
}

.folder-card:hover .delete-btn,
.file-card:hover .delete-btn {
    opacity: 1;
}

.delete-btn:hover {
    background: #e74c3c;
    color: white;
}

/* --- FAB (Floating Action Buttons) --- */
.fab-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}

.upload-fab {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-green);
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.2s;
    border: 2px solid white;
}

.upload-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* --- Screensaver / Splash Screen Premium --- */
.screensaver {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    z-index: 100000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.8s ease;
    gap: 20px;
}

.screensaver.active {
    display: flex;
    opacity: 1;
}

.screensaver-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    animation: screensaver-pulse 3s infinite ease-in-out;
}

.screensaver-brand {
    font-family: 'Segoe UI', Roboto, sans-serif;
    font-weight: 800;
    font-size: 4rem;
    letter-spacing: -2px;
    margin-bottom: 10px;
    text-align: center;
}

.screensaver-subtitle {
    font-size: 1.8rem;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
}

@keyframes screensaver-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* --- Sidebar Overlay (Mobile) --- */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

/* --- Breadcrumb/Back Button --- */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.btn-back:hover {
    background: var(--hover-color);
}

/* --- Global Footer Signature --- */
.global-footer {
    position: fixed;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 9999;
    pointer-events: none;
}

.footer-btn {
    pointer-events: auto;
    background-color: #1e70e6;
    color: white;
    padding: 10px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    border: none;
}

.footer-btn:hover {
    background-color: #1a5bb8;
    transform: translateY(-2px);
    color: white;
}

/* ============================================
   RESPONSIVE - Mobile / Tablet
   ============================================ */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.mobile-active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    .top-bar {
        padding: 12px 15px;
    }

    .content-area {
        padding: 15px;
    }

    .folder-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }

    .file-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
    }

    .file-icon {
        height: 90px;
    }

    .fab-container {
        bottom: 20px;
        right: 15px;
    }

    .upload-fab {
        width: 44px;
        height: 44px;
        font-size: 0.95rem;
    }

    .screensaver {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .screensaver-logo {
        width: 80px;
        height: 80px;
    }

    .screensaver-brand {
        font-size: 2.5rem;
        text-align: center;
    }

    .screensaver-subtitle {
        font-size: 1rem;
    }

    .footer-btn {
        padding: 8px 18px;
        font-size: 0.8rem;
        min-width: 200px;
        text-align: center;
    }

    .login-box {
        padding: 30px 25px;
        margin: 0 15px;
    }
}

/* --- Utilities --- */
.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.justify-content-between {
    justify-content: space-between;
}

.mb-3 {
    margin-bottom: 1rem;
}

.m-0 {
    margin: 0;
}

.text-center {
    text-align: center;
}