
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@300;400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;900&display=swap');

:root {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius-lg: 1rem;
    --radius-md: 0.5rem;

    /* Neumorphic variables from sistemas.html */
    --neu-bg: #e0e5ec;
    --neu-text: #44476a;
    --neu-shadow-light: #ffffff;
    --neu-shadow-dark: #a3b1c6;
    --neu-accent: #ff6b00;
}

[data-theme="dark"] {
    --bg-main: #1a1a1a;
    --bg-card: #242424;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;

    /* Neumorphic variables from sistemas.html */
    --neu-bg: #1a1a1a;
    --neu-text: #e0e0e0;
    --neu-shadow-light: #252525;
    --neu-shadow-dark: #0f0f0f;
    --neu-accent: #ff6b00;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.5;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Neumorphic Helper Classes */
.neu-page {
    background-color: var(--neu-bg) !important;
    color: var(--neu-text) !important;
    font-family: 'Raleway', sans-serif !important;
}

.neu-card {
    text-decoration: none;
    color: var(--neu-text) !important;
    background: var(--neu-bg) !important;
    border: none !important;
    border-radius: 30px;
    box-shadow: 9px 9px 16px var(--neu-shadow-dark),
                -9px -9px 16px var(--neu-shadow-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.neu-card:hover {
    box-shadow: inset 9px 9px 16px var(--neu-shadow-dark),
                inset -9px -9px 16px var(--neu-shadow-light);
    transform: scale(0.98);
    color: var(--neu-accent) !important;
}

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--neu-bg);
    box-shadow: 5px 5px 10px var(--neu-shadow-dark),
                -5px -5px 10px var(--neu-shadow-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    border: none;
    color: var(--neu-text);
    transition: all 0.3s ease;
    z-index: 1000;
}

.theme-toggle:active {
    box-shadow: inset 5px 5px 10px var(--neu-shadow-dark),
                inset -5px -5px 10px var(--neu-shadow-light);
}

/* Base Utility Classes */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.input {
    width: 100%;
    padding: 0.625rem;
    background-color: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color 0.2s;
}

.input:focus {
    border-color: var(--primary);
    ring: 2px solid var(--primary);
}

/* Specific Layouts */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.nav-container {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 50;
}

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

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

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Admin Sidebar Styles */
#admin-sidebar {
    position: fixed;
    top: 140px; /* Align with header */
    left: 0;
    z-index: 1000;
    display: flex;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-sidebar-closed {
    left: -380px !important;
}

.admin-sidebar-open {
    left: 0 !important;
}

.admin-sidebar-content {
    width: 380px; /* Made bigger */
    background: white;
    padding: 2.5rem;
    border-radius: 0 40px 40px 0;
    box-shadow: 20px 0 60px rgba(0,0,0,0.1);
    border: 2px solid var(--border);
    border-left: none;
    display: flex;
    flex-direction: column;
    min-height: 85vh; /* Increased height */
}

.admin-sidebar-tab {
    width: 40px; /* Thinner by default */
    height: 160px;
    background: var(--primary);
    border-radius: 0 24px 24px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 10px 0 30px rgba(59, 130, 246, 0.3);
    position: absolute;
    right: -40px; /* Match thinner width */
    top: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-sidebar-tab:hover {
    width: 60px; /* Expands on hover */
    right: -60px;
}

.admin-sidebar-tab span {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    color: white;
    font-weight: 900;
    font-size: 14px;
    letter-spacing: 2px;
    transform: rotate(180deg);
    white-space: nowrap;
    overflow: hidden;
}

.active-owner {
    border-color: var(--primary) !important; /* Changed to Blue */
    border-width: 2px !important;
    background-color: #eff6ff !important; /* Light blue background */
}

/* Hide scrollbar but keep functionality */
.custom-scrollbar {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}
.custom-scrollbar::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}
