/* CLAROVENDAS - Premium Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* --- DARK THEME (Ultra Premium) --- */
    --bg-body: #0b1120;
    /* Deepest Slate */
    --bg-card: #151e32;
    /* Rich Slate */
    --bg-hover: #1e2840;
    /* Interactive Slate */

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;

    --input-bg: rgba(11, 17, 32, 0.4);
    --input-border: rgba(255, 255, 255, 0.08);
    /* More subtle */
    --input-text: #ffffff;
    --input-placeholder: #566782;

    --sidebar-bg: #0b1120;
    /* Match body for seamless look */
    --sidebar-border: rgba(255, 255, 255, 0.03);
    --sidebar-active-bg: linear-gradient(90deg, rgba(227, 18, 11, 0.1), transparent);
    --sidebar-active-line: #E3120B;

    --primary: #E3120B;
    --primary-hover: #D00F09;
    /* Slightly darker on hover */
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;

    --border-color: rgba(255, 255, 255, 0.05);

    /* Premium Shadows (Dark) */
    --shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 30px -4px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 20px rgba(227, 18, 11, 0.15);
    /* Red Glow */
}

/* --- LIGHT THEME (Corporate Clean) --- */
body.light-mode {
    --bg-body: #f8fafc;
    /* Cool White (Slate 50) */
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;

    --text-main: #0f172a;
    /* Almost Black */
    --text-muted: #64748b;
    /* Slate 500 */
    --text-inverse: #ffffff;

    --input-bg: #ffffff;
    --input-border: #e2e8f0;
    /* Slate 200 */
    --input-text: #0f172a;
    --input-placeholder: #94a3b8;

    --sidebar-bg: #ffffff;
    --sidebar-border: #f1f5f9;
    --sidebar-active-bg: #fef2f2;
    --sidebar-active-line: #E3120B;

    --border-color: #e2e8f0;

    /* Premium Shadows (Light) */
    --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -1px rgba(15, 23, 42, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.05), 0 4px 6px -2px rgba(15, 23, 42, 0.03);
    --shadow-glow: 0 4px 12px rgba(227, 18, 11, 0.15);
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.2s ease, color 0.2s ease;
    min-height: 90vh;
    /* Ensure full height */
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Layout */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Slightly narrower for readability */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.w-full {
    width: 100%;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.text-center {
    text-align: center;
}

.relative {
    position: relative;
}

.overflow-hidden {
    overflow: hidden;
}

/* Premium Card */
.card {
    position: relative;
    /* Fix for absolute children */
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    z-index: 1;
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
    /* Subtle active border hint */
    transform: translateY(-2px);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    border-radius: 0.75rem;
    /* Rounded modern look */
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 0.925rem;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 6px rgba(227, 18, 11, 0.2);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 8px 12px rgba(227, 18, 11, 0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--text-muted);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.6rem;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 0.75rem;
    color: var(--input-text);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(227, 18, 11, 0.15);
    /* Nice focus ring */
}

.form-control::placeholder {
    color: var(--input-placeholder);
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 260px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    padding: 2rem 0;
    z-index: 100;
    transition: background-color 0.2s ease;
}

.sidebar-header {
    padding: 0 1.5rem 2rem;
    border-bottom: 1px solid var(--sidebar-border);
    margin-bottom: 1.5rem;
}

.sidebar-brand {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    display: block;
    letter-spacing: -0.03em;
}

.sidebar-user {
    margin-top: 1.25rem;
    padding: 1rem;
    background: var(--bg-hover);
    border-radius: 0.75rem;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
}

.sidebar-nav {
    padding: 0 1rem;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.25rem;
    margin-bottom: 0.25rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    font-weight: 500;
    position: relative;
    /* For active indicator */
}

.sidebar-item:hover {
    background: var(--bg-hover);
    color: var(--text-main);
}

.sidebar-item.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-line);
    font-weight: 600;
}

/* Active Indicator Strip */
.sidebar-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 15%;
    bottom: 15%;
    width: 4px;
    background: var(--sidebar-active-line);
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.sidebar-item svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.8;
}

.sidebar-logout {
    padding: 2rem 1.5rem;
}

.sidebar-logout button {
    width: 100%;
    border-radius: 0.75rem;
    padding: 1rem;
}

/* Main Area */
.main-with-sidebar {
    margin-left: 260px;
    padding: 2.5rem;
    min-height: 100vh;
}

/* Navbar/Top Mobile */
.navbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-muted);
}

/* Utilities */
.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-with-sidebar {
        margin-left: 0;
        padding: 1.5rem;
    }

    .sidebar-toggle {
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 99;
        padding: 0.6rem;
        border-radius: 0.5rem;
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        color: var(--text-main);
    }
}