:root {
    --primary-color: #004B83;
    --primary-light: #006bb8;
    --secondary-color: #E18800;
    --secondary-light: #ffaa2b;
    --bg-color: #f4f7f6;
    --text-color: #2c3e50;
    --card-bg: #ffffff;
    --sidebar-bg: #002b4d;
    --sidebar-hover: rgba(255, 255, 255, 0.08);
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    letter-spacing: 0.2px;
}

/* Sidebar e Layout Admin */
.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

#sidebar {
    min-width: 260px;
    max-width: 260px;
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--primary-color) 100%);
    color: #fff;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    min-height: 100vh;
    box-shadow: 4px 0 15px rgba(0,0,0,0.05);
    z-index: 999;
}

#sidebar .sidebar-header {
    padding: 30px 20px;
    background: transparent;
    text-align: center;
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

#sidebar ul.components {
    padding: 20px 0;
}

#sidebar ul p {
    color: #fff;
    padding: 10px;
}

#sidebar ul li a {
    padding: 16px 25px;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    border-left: 4px solid transparent;
}

#sidebar ul li a:hover, #sidebar ul li.active > a {
    color: #fff;
    background: var(--sidebar-hover);
    border-left: 4px solid var(--secondary-color);
    padding-left: 30px; /* Micro-animation */
}

#sidebar ul li a i {
    margin-right: 12px;
    font-size: 1.2rem;
}

/* Content */
#content {
    width: 100%;
    padding: 30px;
    min-height: 100vh;
    transition: all 0.3s;
}

/* Navbar topo */
.navbar-custom {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    border-radius: 16px;
    padding: 12px 25px;
    margin-bottom: 35px;
    border: 1px solid rgba(0,0,0,0.02);
}

/* Cards */
.card-custom {
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: var(--card-bg);
    overflow: hidden;
}

.card-custom:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
}

.card-icon {
    font-size: 3rem;
    color: var(--primary-color);
    opacity: 0.85;
    background: rgba(0, 75, 131, 0.05);
    padding: 15px;
    border-radius: 12px;
}

/* Buttons */
.btn {
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 10px 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 75, 131, 0.3);
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, #00365d 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 75, 131, 0.4);
}

.btn-secondary-custom {
    background: linear-gradient(135deg, var(--secondary-light) 0%, var(--secondary-color) 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(225, 136, 0, 0.3);
}

.btn-secondary-custom:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #c47600 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(225, 136, 0, 0.4);
}

/* Inputs & Forms */
.form-control, .form-select {
    border-radius: 10px;
    padding: 12px 15px;
    border: 1px solid #e1e5eb;
    background-color: #f8fafc;
    transition: all 0.2s;
}

.form-control:focus, .form-select:focus {
    background-color: #fff;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(0, 75, 131, 0.1);
}

.input-group-text {
    border-radius: 10px 0 0 10px;
    border: 1px solid #e1e5eb;
    background-color: #f8fafc;
}

/* Tables */
.table {
    margin-bottom: 0;
}
.table > :not(caption) > * > * {
    padding: 1rem 1rem;
    border-bottom-color: rgba(0,0,0,0.03);
}

/* Auth Page */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--sidebar-bg) 100%);
    position: relative;
    overflow: hidden;
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 60%);
    top: -50%;
    left: -50%;
    animation: rotate 60s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 420px;
    padding: 50px 40px;
    position: relative;
    z-index: 10;
    border: 1px solid rgba(255,255,255,0.2);
}

.auth-logo {
    text-align: center;
    margin-bottom: 40px;
    color: var(--primary-color);
    font-weight: 800;
    font-size: 1.8rem;
    letter-spacing: -0.5px;
}

/* Badges */
.badge {
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Responsive */
@media (max-width: 768px) {
    #sidebar {
        margin-left: -260px;
    }
    #sidebar.active {
        margin-left: 0;
        box-shadow: 10px 0 30px rgba(0,0,0,0.5);
    }
    #content { padding: 15px; }
}
