:root {
    --primary-gradient: linear-gradient(135deg, #1e3a8a, #4f46e5, #9333ea);
    --gemini-gradient: linear-gradient(135deg, #4285f4, #9b72cb, #d96570);
    --gemini-gradient-hover: linear-gradient(135deg, #256de2, #7252b4, #b45288);
    --premium-blue: #1a73e8;
    --sidebar-bg: #0f1115;
    --content-bg: #f8fafc;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 80px;
    --border-radius: 16px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--content-bg);
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
}

/* ─── Sidebar ─── */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--sidebar-bg);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid rgba(255,255,255,0.05);
    overflow: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .sidebar-header {
    display: none !important;
}

.sidebar .brand {
    padding: 30px 24px;
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    text-decoration: none;
    letter-spacing: -0.025em;
}

.sidebar .brand i {
    font-size: 1.5rem;
    background: var(--gemini-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-right: 12px;
}

.sidebar.collapsed .brand span {
    display: none;
}

.sidebar.collapsed .brand i {
    margin-right: 0;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 12px 0;
    margin: 4px 10px;
}

.sidebar.collapsed .nav-link span,
.sidebar.collapsed .nav-link::after {
    display: none;
}

.sidebar.collapsed .nav-link i {
    margin-right: 0;
    font-size: 1.25rem;
}

.sidebar .nav-link span {
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .nav-link span {
    opacity: 0;
    width: 0;
}

.sidebar .nav-link {
    color: #94a3b8;
    padding: 12px 20px;
    margin: 4px 16px;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.sidebar .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.sidebar .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
}

.sidebar .nav-link.active i {
    color: #60a5fa;
}

.sidebar .nav-link i {
    width: 24px;
    font-size: 1.1rem;
    margin-right: 12px;
    transition: transform 0.2s ease;
}

.sidebar .nav-link:hover i {
    transform: translateX(2px);
}

/* ─── Main Content ─── */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 40px 60px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-content.expanded {
    margin-left: var(--sidebar-collapsed-width);
}

/* ─── Cards & UI ─── */
.card {
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    background: #fff;
}

.card-header {
    background-color: #fff !important;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 20px 24px;
    font-weight: 700;
    color: #0f172a;
}

/* ─── Premium Buttons ─── */
.btn-premium {
    background: var(--primary-gradient);
    border: none;
    color: white;
    font-weight: 600;
    padding: 7px 28px;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
    color: #fff;
}

.btn-gemini {
    color: #ffffff;
    border: 1px solid #e2e8f0;
    font-weight: 600;
    padding: 7px 24px;
    border-radius: 50px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    background: var(--gemini-gradient);
}

.btn-gemini:hover {
    border-color: transparent;
    color: #fff;
    background: var(--gemini-gradient-hover);
}

/* .btn-gemini::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.btn-gemini > * {
    position: relative;
    z-index: 1;
}

.btn-gemini:hover::before {
    opacity: 1;
} */

/* ─── Badges ─── */
.badge-premium {
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
}

/* ─── Tables ─── */
.table {
    border-collapse: separate;
    border-spacing: 0 8px;
}

.table tr {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    border-radius: 8px;
}

.table td, .table th {
    padding: 16px 20px;
    border: none;
}

.table thead th {
    background: transparent;
    color: #777;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

/* ─── Animations ─── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade {
    animation: fadeIn 0.4s ease forwards;
}

/* Modernizing forms */
.form-control, .form-select {
    border-radius: 8px;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
}

.form-control:focus {
    box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.1);
    border-color: var(--premium-blue);
}

.grayscale {
    filter: grayscale(1) opacity(0.5);
    pointer-events: none;
}

/* ─── Post Content Styling ─── */
.post-body {
    line-height: 1.8;
    color: #334155;
}

.post-body h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.post-body h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.post-body p {
    margin-bottom: 1.25rem;
}

.post-body table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.post-body th, .post-body td {
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    text-align: left;
}

.post-body th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #1e293b;
}

.post-body tr:nth-child(even) {
    background-color: #f1f5f9;
}

/* ─── Login Page ─── */
.login-page {
    background-color: var(--sidebar-bg);
    background-image: 
        radial-gradient(at 0% 0%, rgba(66, 133, 244, 0.15) 0, transparent 50%), 
        radial-gradient(at 100% 100%, rgba(147, 51, 234, 0.15) 0, transparent 50%);
    height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    perspective: 1000px;
}

.login-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: cardAppear 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.brand-logo-login {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    text-align: center;
    margin-bottom: 30px;
    display: block;
    text-decoration: none;
}

.brand-logo-login i {
    background: var(--gemini-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-right: 10px;
}

.login-page .form-label {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.login-page .form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    padding: 12px 16px;
    transition: all 0.3s ease;
}

.login-page .form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(66, 133, 244, 0.5);
    box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.15);
    color: #fff;
}

.btn-login-premium {
    background: var(--primary-gradient);
    border: none;
    color: #fff;
    font-weight: 700;
    padding: 14px;
    border-radius: 12px;
    margin-top: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4);
}

.btn-login-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(79, 70, 229, 0.5);
    filter: brightness(1.1);
    color: #fff;
}

.alert-login-custom {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
    color: #ff8080;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.login-copyright {
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
    margin-top: 30px;
}
