/* Estilos globales y variables */
:root {
    --primary: #0097e6;
    --primary-dark: #007bb5;
    --secondary: #2f3640;
    --text-color: #2f3640;
    --text-muted: #7f8fa6;
    --bg-light: #f5f6fa;
    --white: #ffffff;
    --border-color: #dcdde1;
    --success: #44bd32;
    --danger: #e84118;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-color);
}

.bg-light { background-color: var(--bg-light); }

/* UTILIDADES */
.shadow-lg {
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}
.btn-primary:hover { background-color: var(--primary-dark); }
.btn-success { background-color: var(--success); color: var(--white); }
.btn-danger { background-color: var(--danger); color: var(--white); }
.btn-block { width: 100%; }

.link-primary {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}
.link-primary:hover { text-decoration: underline; }

/* LOGIN */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}
.login-card {
    background: var(--white);
    width: 100%;
    max-width: 400px;
    border-radius: 16px;
    overflow: hidden;
}
.login-header {
    text-align: center;
    padding: 30px 20px 20px;
}
.login-header h2 { color: var(--secondary); margin-bottom: 5px; }
.login-header p { color: var(--text-muted); }

.login-body {
    padding: 0 30px 30px;
}
.input-group {
    position: relative;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}
.input-group i {
    position: absolute;
    left: 15px;
    color: var(--text-muted);
    font-size: 18px;
}
.input-group .eye-icon {
    left: auto;
    right: 15px;
    cursor: pointer;
}
.input-group input {
    width: 100%;
    padding: 15px 40px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s;
}
.input-group input:focus { border-color: var(--primary); }

.options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}
.checkbox-container {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: var(--secondary);
    cursor: pointer;
}
.checkbox-container input { margin-right: 8px; cursor: pointer; }

/* LAYOUT DASHBOARD SUPERADMIN */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}
.sidebar {
    width: 260px;
    background-color: var(--secondary);
    color: var(--white);
    display: flex;
    flex-direction: column;
}
.sidebar-header {
    padding: 20px;
    font-size: 20px;
    font-weight: bold;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}
.sidebar-menu {
    flex: 1;
    padding: 20px 0;
    list-style: none;
}
.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: 0.3s;
    font-size: 16px;
}
.sidebar-menu li a i {
    margin-right: 15px;
    font-size: 20px;
}
.sidebar-menu li a:hover, .sidebar-menu li a.active {
    background-color: rgba(255,255,255,0.1);
    color: var(--white);
    border-left: 4px solid var(--primary);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.top-navbar {
    height: 70px;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.page-content {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
}

/* CARDS DE METRICAS */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.metric-card {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
}
.metric-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: rgba(0, 151, 230, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-right: 15px;
}
.metric-info h3 { font-size: 24px; color: var(--secondary); }
.metric-info p { color: var(--text-muted); font-size: 14px; }

/* TABLAS */
.table-container {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
}
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
th {
    color: var(--text-muted);
    font-weight: 600;
}
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}
.badge-active { background: rgba(68, 189, 50, 0.1); color: var(--success); }
.badge-inactive { background: rgba(232, 65, 24, 0.1); color: var(--danger); }

/* MODAL FORM */
.swal2-input { width: auto !important; }

/* ESTILO MACSTORE PARA MODALES SWEETALERT */
.swal-popup-mac {
    border-radius: 24px !important;
    padding: 30px !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1) !important;
    border: 1px solid rgba(0,0,0,0.05) !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
}
.swal-confirm-mac {
    background-color: #007aff !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    padding: 12px 24px !important;
    box-shadow: 0 4px 10px rgba(0, 122, 255, 0.2) !important;
}
.swal-cancel-mac {
    background-color: #e5e5ea !important;
    color: #3a3a3c !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    padding: 12px 24px !important;
}
