* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f8fafc;
    color: #334155;
    line-height: 1.6;
}

/* OFICIALIDAD*/
.card-header {
    font-size: 1rem;
    font-weight: 600;
}
.card-title {
    font-size: 1.1rem;
}
.badge.bg-success {
    font-size: 0.85rem;
    padding: 0.35em 0.6em;
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

.login-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #1e293b;
    font-size: 24px;
    margin-bottom: 8px;
}

.login-header p {
    color: #64748b;
    font-size: 14px;
}

.login-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

/* Layout */
.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.sidebar-header h2 {
    font-size: 18px;
    color: #1e293b;
    margin-bottom: 16px;
}

.user-info {
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
}

.user-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
}

.user-email {
    color: #64748b;
    font-size: 12px;
    margin-top: 4px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px;
}

.nav-item {
    display: block;
    padding: 12px 16px;
    color: #475569;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: all 0.2s;
}

.nav-item:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.nav-item.active {
    background: #1e293b;
    color: white;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid #e2e8f0;
}

.main-content {
    margin-left: 280px;
    flex: 1;
    padding: 32px;
    min-height: 100vh;
}

/* Components */
.page-header {
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.page-header h1 {
    font-size: 32px;
    color: #1e293b;
    margin-bottom: 4px;
}

.page-header p {
    color: #64748b;
    font-size: 14px;
}

/* Alerts */
.alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    border: 1px solid;
}

.alert-success {
    background: #f0fdf4;
    border-color: #86efac;
    color: #166534;
}

.alert-error {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #1e293b;
    color: white;
}

.btn-primary:hover {
    background: #334155;
}

.btn-secondary {
    background: #64748b;
    color: white;
}

.btn-success {
    background: #22c55e;
    color: white;
}

.btn-warning {
    background: #f59e0b;
    color: white;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-info {
    background: #3b82f6;
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
    text-align: center;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #1e293b;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1e293b;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-card.stat-warning {
    background: #fffbeb;
}

.stat-icon {
    font-size: 36px;
}

.stat-content h3 {
    font-size: 32px;
    color: #1e293b;
}

.stat-content p {
    color: #64748b;
    font-size: 14px;
}

/* Cards */
.cards-container {
    display: grid;
    gap: 20px;
}

.card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.card-header h3 {
    color: #1e293b;
    font-size: 18px;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 8px;
}

/* Badges */
.badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-pendiente {
    background: #fef3c7;
    color: #92400e;
}

.badge-aprobada {
    background: #dbeafe;
    color: #1e40af;
}

.badge-activada {
    background: #d1fae5;
    color: #065f46;
}

.badge-bloqueada {
    background: #fee2e2;
    color: #991b1b;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    font-size: 14px;
}

.description {
    margin-top: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 14px;
    color: #475569;
}

/* Filters */
.filters-bar {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
}

.filters-form {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.filters-form input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}

.filters-form select {
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    overflow-y: auto;
}

.modal-content {
    background: white;
    margin: 5% auto;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 20px;
    color: #1e293b;
}

.close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #94a3b8;
}

.close:hover {
    color: #1e293b;
}

.modal-content form {
    padding: 24px;
}

.modal-footer {
    padding: 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Dashboard Specific */
.dashboard-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.info-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.info-card h3 {
    color: #1e293b;
    margin-bottom: 16px;
}

.info-card ul {
    list-style: none;
}

.info-card li {
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.progress-bar {
    background: #e2e8f0;
    border-radius: 8px;
    height: 8px;
    overflow: hidden;
    margin: 16px 0;
}

.progress {
    background: #22c55e;
    height: 100%;
    transition: width 0.3s;
}

/* Permisos */
.permisos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.permiso-item {
    display: contents;
}

.btn-permiso {
    padding: 10px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
}

.btn-permiso:hover {
    border-color: #cbd5e1;
}

.btn-permiso.active {
    background: #d1fae5;
    border-color: #22c55e;
    color: #065f46;
    font-weight: 600;
}

/* Utilities */
.text-muted {
    color: #64748b;
}

.text-small {
    font-size: 14px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.empty-state p {
    font-size: 18px;
    color: #64748b;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .main-content {
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        gap: 16px;
    }
}
