/* Estilos personalizados para Sistema de Contadores */

:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #60a5fa;
    --dark-bg: #1f2937;
    --light-bg: #f8fafc;
    --text-dark: #1e293b;
    --border-color: #e2e8f0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-dark);
}

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

/* Sidebar */
.sidebar {
    min-width: 280px;
    max-width: 280px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--dark-bg) 100%);
    color: #fff;
    transition: all 0.3s;
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar.active {
    margin-left: -280px;
}

.sidebar .sidebar-header {
    padding: 1.5rem 1.25rem;
    background: rgba(0, 0, 0, 0.2);
}

.sidebar .sidebar-header h3 {
    color: #fff;
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0;
}

.sidebar .sidebar-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    margin: 0.25rem 0 0 0;
}

.sidebar ul.components {
    padding: 1rem 0;
}

.sidebar ul li {
    padding: 0;
}

.sidebar ul li a {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    display: block;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-left-color: var(--accent-color);
}

.sidebar ul li a i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

.sidebar .sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
}

/* Content Area */
#content {
    width: 100%;
    min-height: 100vh;
    transition: all 0.3s;
    margin-left: 280px;
}

#content.active {
    margin-left: 0;
}

/* Top Bar */
.top-bar {
    background: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar .toggle-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s;
}

.top-bar .toggle-btn:hover {
    color: var(--secondary-color);
}

.top-bar .user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.top-bar .user-info .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

/* Main Content */
.main-content {
    padding: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        margin-left: -280px;
    }

    .sidebar.active {
        margin-left: 0;
    }

    #content {
        margin-left: 0;
    }

    #content.active {
        margin-left: 280px;
    }
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.1);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
    padding: 1rem 1.5rem;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    border-radius: 8px;
    padding: 0.625rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(30, 58, 138, 0.3);
}

.btn-outline-primary {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    border-radius: 8px;
    font-weight: 600;
}

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

/* Forms */
.form-control, .form-select {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.625rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.15);
}

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
}

.login-card {
    max-width: 450px;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #64748b;
}

/* Tables */
.table {
    border-radius: 12px;
    overflow: hidden;
}

.table thead th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    border: none;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.05);
    transform: scale(1.01);
}

/* Badges */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.75rem;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    font-weight: 500;
}

/* Profile Info */
.profile-info {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.profile-info .info-row {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.profile-info .info-row:last-child {
    border-bottom: none;
}

.profile-info .info-label {
    font-weight: 600;
    color: #64748b;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-info .info-value {
    color: var(--text-dark);
    font-size: 1.125rem;
    margin-top: 0.25rem;
}

/* Pagination */
.pagination {
    margin-top: 2rem;
}

.pagination .page-link {
    border: 2px solid var(--border-color);
    color: var(--secondary-color);
    border-radius: 6px;
    margin: 0 0.25rem;
    font-weight: 600;
}

.pagination .page-link:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Utilities */
.shadow-sm {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.07) !important;
}

.shadow {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07) !important;
}

.shadow-lg {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1) !important;
}
