/* ==============================
   ASISTEN GURU AI — Custom CSS
   ============================== */

/* Base */
* { box-sizing: border-box; }
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; }
.app-body { display: flex; height: 100vh; overflow: hidden; background: #f8fafc; }

/* Sidebar */
.sidebar {
    width: 272px;
    min-width: 272px;
    background: #fff;
    border-right: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    transition: transform 0.3s ease;
    z-index: 50;
}

@media (max-width: 991px) {
    .sidebar {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        transform: translateX(-100%);
        box-shadow: 4px 0 24px rgba(0,0,0,0.08);
    }
    .sidebar.open { transform: translateX(0); }
}

.sidebar-overlay {
    position: fixed; inset: 0;
    background: rgba(15,23,42,0.3);
    backdrop-filter: blur(2px);
    z-index: 49;
    display: none;
}
.sidebar-overlay.active { display: block; }

.sidebar-logo { cursor: pointer; }
.sidebar-nav { flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }

.nav-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
    padding: 0 1rem 0.4rem;
}

.sidebar-btn {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.65rem 1rem;
    border: none;
    background: transparent;
    border-radius: 0.75rem;
    color: #475569;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.18s;
    margin-bottom: 2px;
}
.sidebar-btn:hover { background: #eff6ff; color: #2563eb; }
.sidebar-btn.active { background: #2563eb; color: #fff; font-weight: 700; box-shadow: 0 4px 12px rgba(37,99,235,0.25); }
.sidebar-btn .dot { width: 6px; height: 6px; border-radius: 50%; background: #93c5fd; flex-shrink: 0; transition: background 0.2s; }
.sidebar-btn:hover .dot { background: #2563eb; }
.sidebar-btn.active .dot { background: #fff; }

/* Main wrapper */
.main-wrapper { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }

/* Header */
.app-header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* Main content area */
.app-main { flex: 1; overflow-y: auto; }

/* Footer */
.app-footer { border-top: 1px solid #f1f5f9; }

/* Pulse dot */
.pulse-dot { width: 7px; height: 7px; display: inline-block; animation: pulse 1.8s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* Hero card */
.hero-card {
    background: linear-gradient(135deg, #2563eb 0%, #4338ca 100%);
    min-height: 220px;
}
.hero-bg-circle { position: absolute; border-radius: 50%; filter: blur(40px); }
.hero-circle-1 { width: 320px; height: 320px; background: rgba(255,255,255,0.12); top: -80px; right: -80px; }
.hero-circle-2 { width: 250px; height: 250px; background: rgba(96,165,250,0.15); bottom: -80px; left: -60px; }
.hero-icon-bg { position: absolute; bottom: 20px; right: 30px; font-size: 10rem; color: rgba(255,255,255,0.05); }
.z-1 { position: relative; z-index: 1; }

/* Tool cards */
.tool-card {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 1.5rem;
    padding: 1.75rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.28s ease;
    text-align: left;
    width: 100%;
    display: flex;
    flex-direction: column;
}
.tool-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 8px 32px rgba(37,99,235,0.1);
    transform: translateY(-4px);
}
.tool-icon {
    width: 52px; height: 52px;
    border-radius: 0.875rem;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.25s;
    flex-shrink: 0;
}
.tool-card:hover .tool-icon { transform: scale(1.1) rotate(3deg); }
.tool-card-title { transition: color 0.2s; }
.tool-card:hover .tool-card-title { color: #2563eb; }
.tool-card-cta {
    margin-top: auto;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #2563eb;
    display: flex;
    align-items: center;
    gap: 4px;
}
.tool-card-accent {
    position: absolute; top: 0; right: 0;
    width: 3px; height: 0;
    background: #2563eb;
    border-radius: 0 1.5rem 1.5rem 0;
    transition: height 0.3s ease;
}
.tool-card:hover .tool-card-accent { height: 100%; }

/* Purple color */
.bg-purple { background-color: #8b5cf6 !important; }
.text-purple { color: #8b5cf6 !important; }

/* Tool view */
.tool-header {
    position: sticky; top: 0; z-index: 10;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.tool-icon-sm { width: 38px; height: 38px; font-size: 1rem; }
.tool-scroll { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }

/* Form styles */
.form-control, .form-select {
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.form-control:focus, .form-select:focus {
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.form-label { font-size: 0.72rem; letter-spacing: 0.06em; }

/* Animate */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fadeIn { animation: fadeInUp 0.4s ease-out forwards; }

/* Collapsible icon */
.transition-icon { transition: transform 0.25s; }
.bi-chevron-up { transform: rotate(180deg); }

/* History card hover */
.history-card {
    cursor: pointer;
    transition: all 0.25s ease;
}
.history-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(37,99,235,0.1) !important;
    border-color: #93c5fd !important;
}

/* Admin table */
.table > :not(caption) > * > * { padding: 0.85rem 0.75rem; }

/* Cursor pointer */
.cursor-pointer { cursor: pointer; }

/* Tracking */
.tracking-wide { letter-spacing: 0.06em; }
.fw-extrabold { font-weight: 800; }
.opacity-90 { opacity: 0.9; }

/* Scrollbar webkit */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
