:root {
    /* Colores Principales */
    --primary-dark: #0D2A44;
    --primary-light: #1261A0;
    --success: #1E824C;
    --danger: #C0392B;
    --warning: #D68910;
    --emergency: #BA4A00;
    --neutral: #2F2F2F;
    --info: #0284c7;
    --fondo: #F7F9FB;
    
    /* Colores de Texto */
    --text-primary: #0e1217;
    --text-secondary: #475569;
    --text-tertiary: #64748b;
    
    /* Colores de Fondo */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    
    /* Espaciado */
    --space-xxs: 4px;
    --space-xs: 8px;
    --space-s: 16px;
    --space-m: 24px;
    --space-l: 32px;
    --space-xl: 48px;
    
    /* Tipografía */
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-mono: 'Consolas', 'Monaco', monospace;
}

/* RESET Y BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: #f5f5f5;
    padding: 40px 20px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/*CONTENEDOR PRINCIPAL*/
.container {
    max-width: 1400px;
    margin: 0 auto;
    background: var(--fondo);
    padding: 50px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* HEADER */
.header {
    margin-bottom: 50px;
    padding-bottom: 30px;
    background: linear-gradient(to right,#122B59, #1CA9E0  );
    color: white;
    font-weight: 600;
    padding: 10 px 20 px;
    text-align: center;
    border-radius: 12px;
}

h1 {
    color: var(--bg-primary);
    font-size: 42px;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.subtitle {
    color: var(--bg-secondary);
    font-size: 20px;
    margin-bottom: 10px;
    font-weight: 500;
}


/* SECCIONES */
.section {
    margin-bottom: 60px;
}

.section-title {
    color: var(--text-primary);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--text-primary);
}

.subsection {
    margin-bottom: 40px;
}

.subsection-title {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* PALETA DE COLORES */
.color-palette {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 24px;
}

.color-box {
    text-align: center;
    border-radius: 12px;
}

.color-swatch {
    height: 140px;
    border-radius: 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
    position: relative;
}

.color-swatch:hover {
    transform: translateY(+4px);
}

.swatch-label {
    font-weight: 700;
    font-size: 16px;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.primary-dark { background: var(--primary-dark); }
.primary-light { background: var(--primary-light); }
.success { background: var(--success); }
.danger { background: var(--danger); }
.warning { background: var(--warning); }
.emergency { background: var(--emergency); }
.neutral { background: var(--neutral); }
.info { background: var(--info); }
.bg {background: var(--fondo);}

.color-name {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-size: 15px;
}

.color-hex {
    color: var(--text-tertiary);
    font-size: 14px;
    font-family: var(--font-mono);
    margin-bottom: 6px;
}

.color-use {
    color: var(--text-tertiary);
    font-size: 12px;
    line-height: 1.4;
}

/* TIPOGRAFÍA */
.typography-sample {
    margin-bottom: 24px;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: 10px;
    border-left: 4px solid var(--primary-dark);
    transition: transform 0.3s ease;
    
}

.type-display {
    margin-bottom: 12px;
    transform: translateY(+4px);
}

.type-info {
    color: var(--text-tertiary);
    font-size: 13px;
    margin-bottom: 6px;
    font-family: var(--font-mono);
}

.type-usage {
    color: var(--text-tertiary);
    font-size: 13px;
    font-style: italic;
}

.heading-1 {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-dark);
    letter-spacing: -0.5px;
}

.heading-2 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
}

.heading-3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.body-text {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    font-weight: 600;
}

.label-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.example {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
}

.caption {
    font-size: 13px;
    color: var(--text-tertiary);
}

.code-text {
    font-family: var(--font-mono);
    font-size: 18px;
    color: var(--primary-dark);
    font-weight: 700;
    letter-spacing: 2px;
}

/*  BOTONES  */
.button-section {
    margin-bottom: 30px;
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px;
}

.button-sample {
    text-align: center;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 12px;
    font-family: var(--font-family);
}

.btn-primary {
    background: var(--primary-light);
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #047857;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.4);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4);
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-warning:hover {
    background: #b45309;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(217, 119, 6, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--neutral);
    border: 2px solid #4f5255;
}

.btn-secondary:hover {
    background: #4f5255;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(100, 116, 139, 0.4);
}

.btn-outline {
    background: white;
    color: var(--primary-light);
    border: 2px solid var(--primary-light);
}

.btn-outline:hover {
    background: var(--primary-light);
    color: white;
}

.btn-danger-outline {
    background: white;
    color: var(--danger);
    border: 2px solid var(--danger);
}

.btn-danger-outline:hover {
    background: var(--danger);
    color: white;
}

.btn-emergency {
    background: #d91200;
    color: white;
    font-size: 17px;
    font-weight: 700;
}

.btn-emergency:hover {
    background: #d91200;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(234, 88, 12, 0.5);
}

.btn-logout {
    background: #940c00;
    color: white;
}

.btn-logout:hover {
    background: #940c00;
    transform: translateY(-2px);
}

.btn-info {
    background: rgb(0, 0, 65);
    color: white;
}

.btn-info:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    border: var(--primary-light);
}

/* ==================== ESTADOS DEL SISTEMA ==================== */
.state-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.state-card {
    padding: 24px;
    border-radius: 10px;
    text-align: center;
    border: 3px solid;
    transition: transform 0.3s ease;
}

.state-card:hover {
    transform: translateY(-4px);
}

.state-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

.state-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 6px;
}

.state-desc {
    font-size: 13px;
    opacity: 0.9;
}

.state-online {
    background: #d1fae5;
    color: #065f46;
    border-color: var(--success);
}

.state-offline {
    background: #fee2e2;
    color: #991b1b;
    border-color: var(--danger);
}

.state-syncing {
    background: #fef3c7;
    color: #92400e;
    border-color: var(--warning);
}

.state-granted {
    background: #d1fae5;
    color: #065f46;
    border-color: var(--success);
}

.state-denied {
    background: #fee2e2;
    color: #991b1b;
    border-color: var(--danger);
}

.state-restricted {
    background: #ffe4e6;
    color: #881337;
    border-color: #be123c;
}

.state-time-denied {
    background: #fff7ed;
    color: #9a3412;
    border-color: #ea580c;
}

.state-active {
    background: #dbeafe;
    color: #1e40af;
    border-color: var(--primary-light);
}

.state-expiring {
    background: #fef3c7;
    color: #92400e;
    border-color: var(--warning);
}

.state-expired {
    background: #f1f5f9;
    color: #475569;
    border-color: var(--neutral);
}

.state-emergency {
    background: #fed7aa;
    color: #7c2d12;
    border-color: var(--emergency);
    font-weight: 700;
}

.state-title-attempts {
    font-weight: 700;
    font-size: 26px;
    margin-bottom: 24px;
    text-align: center;
}

.state-failed-attempts {
    background: #fef08a;
    color: #713f12;
    border-color: #eab308;
    font-weight: 700;
    text-align: center;
}

/* ==================== FORMULARIOS ==================== */
.form-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.form-column {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 10px;
}

.form-sample {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    font-size: 16px;
    font-family: var(--font-family);
    transition: all 0.3s;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.form-input-file {
    padding: 10px;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    width: 100%;
    font-size: 14px;
    cursor: pointer;
}

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-tertiary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ==================== TARJETAS DE INFORMACIÓN ==================== */
.card-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.info-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 2px solid #e2e8f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.card-header {
    padding: 20px;
    background: var(--bg-secondary);
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-icon {
    font-size: 28px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.card-body {
    padding: 20px;
}

.card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.card-row:last-child {
    border-bottom: none;
}

.card-label {
    font-size: 14px;
    color: var(--text-tertiary);
    font-weight: 600;
}

.card-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.credential-code {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-dark);
    letter-spacing: 2px;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-employee {
    background: #dbeafe;
    color: #1e40af;
}

.badge-active {
    background: #d1fae5;
    color: #065f46;
}

.badge-entry {
    background: #e0e7ff;
    color: #3730a3;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

/* ==================== ICONOGRAFÍA ==================== */
.icon-section {
    margin-bottom: 40px;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
}

.icon-sample {
    text-align: center;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.icon-sample:hover {
    background: #e0f2fe;
    transform: translateY(-4px);
}

.icon {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
}

.icon-label {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
}

/* ==================== MENSAJES Y ALERTAS ==================== */
.message-examples {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid;
}

.message-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.message-content {
    flex: 1;
}

.message-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}

.message-text {
    font-size: 14px;
    line-height: 1.5;
}

.message-success {
    background: #d1fae5;
    border-left-color: var(--success);
    color: #065f46;
}

.message-error {
    background: #fee2e2;
    border-left-color: var(--danger);
    color: #991b1b;
}

.message-warning {
    background: #fef3c7;
    border-left-color: var(--warning);
    color: #92400e;
}

.message-info {
    background: #dbeafe;
    border-left-color: var(--info);
    color: #1e40af;
}

/* ==================== ESPACIADO ==================== */
.spacing-examples {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.spacing-item {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.spacing-box {
    background: var(--primary-light);
    border-radius: 4px;
    flex-shrink: 0;
}

.spacing-label {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 700;
    min-width: 80px;
}

.spacing-desc {
    color: var(--text-tertiary);
    font-size: 14px;
}

/* ==================== PRINCIPIOS DE DISEÑO ==================== */
.principles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.principle-card {
    background: var(--bg-secondary);
    padding: 28px;
    border-radius: 12px;
    border-left: 4px solid var(--primary-light);
}

.principle-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.principle-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.principle-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==================== LAYOUTS ==================== */

.section-title2{
    color: var(--text-primary);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--text-primary); 
    text-align: center; 
}
.layout-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.layout-card {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: 12px;
}

.layout-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.layout-wireframe {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}

.wireframe-element {
    background: #cbd5e1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 600;
}

.wireframe-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.wireframe-body {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.wireframe-sidebar {
    width: 150px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-item {
    height: 40px;
}

.wireframe-content {
    flex: 1;
}

.wireframe-footer {
    display: flex;
    justify-content: space-between;
}

.wireframe-form-header {
    margin-bottom: 16px;
}

.wireframe-form-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.form-field {
    height: 50px;
}

.wireframe-form-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-wireframe {
    height: 45px;
    width: 150px;
}

.btn-wireframe.primary {
    background: var(--primary-light);
}

.btn-wireframe.secondary {
    background: var(--neutral);
}

/* ==================== FOOTER ==================== */
.footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 3px solid var(--primary-light);
    text-align: center;
}

.footer-text {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.footer-note {
    font-size: 13px;
    color: var(--text-tertiary);
    line-height: 1.6;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .container {
        padding: 30px 20px;
    }
    
    h1 {
        font-size: 32px;
    }
    
    .color-palette,
    .button-grid,
    .state-grid,
    .icon-grid,
    .card-examples,
    .principles-grid,
    .layout-examples {
        grid-template-columns: 1fr;
    }
    
    .form-examples {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}