﻿* {
    box-sizing: border-box;
}

:root {
    --pe-orange: #f23a09;
    --pe-orange-dark: #c94412;
    --pe-black: #222d32;
    --pe-black-2: #1a2226;
    --pe-sidebar: #2f3b42;
    --pe-sidebar-hover: #263238;
    --pe-bg: #ecf0f5;
    --pe-line: #d2d6de;
    --pe-text: #333;
    --pe-muted: #777;
    --pe-white: #fff;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: "Source Sans Pro", "Segoe UI", Arial, sans-serif;
    background: var(--pe-bg);
    color: var(--pe-text);
    font-size: 14px;
}

a {
    color: var(--pe-orange-dark);
}

.admin-wrapper {
    min-height: 100vh;
    background: var(--pe-bg);
}

.main-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1000;
    height: 50px;
    display: flex;
    background: var(--pe-orange);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
}

.main-header .logo {
    display: block;
    width: 230px;
    height: 50px;
    line-height: 50px;
    padding: 0 15px;
    overflow: hidden;
    background: #d73205;
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-size: 18px;
    letter-spacing: 0;
    white-space: nowrap;
}

.logo-mini {
    display: none;
}

.logo-lg b {
    font-weight: 800;
}

.navbar {
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
    color: #fff;
}

.sidebar-toggle {
    width: 50px;
    height: 50px;
    padding: 15px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.sidebar-toggle:hover {
    background: rgba(0, 0, 0, 0.12);
}

.sidebar-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: #fff;
}

.navbar-title {
    font-weight: 600;
    font-size: 15px;
}

.navbar-user {
    margin-left: auto;
    padding: 0 18px;
    font-size: 13px;
    opacity: 0.95;
}

.sidebar {
    position: fixed;
    top: 50px;
    bottom: 0;
    left: 0;
    z-index: 900;
    width: 230px;
    background: var(--pe-black);
    color: #b8c7ce;
    overflow-y: auto;
}

.sidebar-inner {
    padding-bottom: 24px;
}

.user-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.user-logo {
    position: relative;
    flex: 0 0 44px;
    width: 44px;
    height: 36px;
}

.user-logo span {
    position: absolute;
    display: block;
    border-radius: 50%;
    background: var(--pe-orange);
}

.user-logo span:nth-child(1) {
    width: 30px;
    height: 30px;
    left: 0;
    bottom: 0;
}

.user-logo span:nth-child(2) {
    width: 16px;
    height: 16px;
    left: 28px;
    top: 1px;
}

.user-logo span:nth-child(3) {
    width: 9px;
    height: 9px;
    right: 0;
    bottom: 7px;
}

.user-info strong,
.user-info small {
    display: block;
}

.user-info strong {
    color: #fff;
    font-size: 13px;
}

.user-info small {
    color: #9eaeb6;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.04em;
}

.sidebar-menu {
    display: block;
    padding: 0;
    margin: 0;
}

.menu-header {
    padding: 11px 25px 10px 15px;
    color: #4b646f;
    background: var(--pe-black-2);
    font-size: 11px;
    text-transform: uppercase;
}

.menu-header-secondary {
    margin-top: 10px;
}

.sidebar-menu a {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 12px 12px 12px 15px;
    color: #b8c7ce;
    text-decoration: none;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover {
    color: #fff;
    background: var(--pe-sidebar-hover);
}

.sidebar-menu a.active {
    color: #fff;
    background: #1e282c;
    border-left-color: var(--pe-orange);
}

.sidebar-menu .logout-link {
    color: #f5b6a4;
}

.nav-icon {
    width: 24px;
    margin-right: 8px;
    color: inherit;
    text-align: center;
    font-size: 15px;
}

.content-area {
    min-height: calc(100vh - 50px);
    margin-left: 230px;
    padding: 70px 15px 24px;
    background: var(--pe-bg);
}

.content-area > h1 {
    margin: 0 0 4px;
    color: #333;
    font-size: 24px;
    font-weight: 400;
}

.content-area > p {
    margin: 0 0 18px;
    color: var(--pe-muted);
}

h2 {
    margin: 0 0 12px;
    color: #333;
    font-size: 18px;
    font-weight: 400;
}

.card {
    position: relative;
    margin-bottom: 20px;
    padding: 0;
    background: #fff;
    border-top: 3px solid var(--pe-orange);
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

.card > h2,
.card > h3 {
    margin: 0;
    padding: 12px 15px;
    border-bottom: 1px solid #f4f4f4;
    font-size: 18px;
    font-weight: 400;
}

.card > form,
.card > .form-grid,
.card > p,
.card > div:not(.table-responsive) {
    padding: 15px;
}

.mb-30 {
    margin-bottom: 30px;
}

.dashboard-stats.form-grid {
    margin-bottom: 20px;
}

.stat-box {
    min-height: 110px;
    border-top-color: #111318;
}

.stat-box h3 {
    color: #fff;
    background: var(--pe-orange);
    border-bottom: 0;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
}

.stat-box p {
    padding: 18px 15px 20px;
    font-size: 34px;
    font-weight: 300;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(230px, 1fr));
    gap: 15px;
}

.form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    max-width: 100%;
    margin-bottom: 5px;
    font-weight: 700;
}

.form-group input,
.form-group select {
    display: block;
    width: 100%;
    height: 34px;
    padding: 6px 12px;
    border: 1px solid #d2d6de;
    border-radius: 0;
    background: #fff;
    color: #555;
    font-size: 14px;
    line-height: 1.42857143;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--pe-orange);
    outline: 0;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--pe-muted);
    font-size: 12px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.btn-primary,
.btn-search,
.btn-sm {
    display: inline-block;
    border: 1px solid transparent;
    border-radius: 0;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    white-space: nowrap;
    cursor: pointer;
}

.btn-primary,
.btn-search {
    padding: 7px 12px;
    background: var(--pe-orange);
    border-color: #d73205;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.btn-primary:hover,
.btn-search:hover {
    background: var(--pe-orange-dark);
    color: #fff;
}

.btn-lg {
    padding: 10px 16px;
    font-size: 16px;
}

.table-responsive {
    min-height: 0.01%;
    overflow-x: auto;
    margin-bottom: 20px;
    background: #fff;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
}

table {
    width: 100%;
    max-width: 100%;
    border-spacing: 0;
    border-collapse: collapse;
    background: #fff;
}

table th,
table td {
    padding: 8px;
    border-top: 1px solid #f4f4f4;
    text-align: left;
    vertical-align: middle;
    line-height: 1.42857143;
}

table thead th,
table th {
    border-bottom: 2px solid #f4f4f4;
    background: #fff;
    color: #333;
    font-weight: 700;
}

table tbody tr:nth-child(even) {
    background: #fbfbfb;
}

table tbody tr:hover {
    background: #fff7f4;
}

.badge {
    display: inline;
    padding: 0.2em 0.6em 0.3em;
    border-radius: 0.25em;
    color: #fff;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

.badge-valido,
.badge-vÃ¡lido,
.badge-vÃƒÂ¡lido {
    background: #00a65a;
}

.badge-anulado,
.badge-vencido {
    background: #dd4b39;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
    line-height: 1.5;
}

.btn-edit {
    background: #f39c12;
    border-color: #e08e0b;
    color: #fff;
}

.btn-delete {
    background: #dd4b39;
    border-color: #d73925;
    color: #fff;
}

.btn-view {
    background: #3c8dbc;
    border-color: #367fa9;
    color: #fff;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 0;
    font-weight: 600;
}

.alert-error {
    background: #f2dede;
    border-color: #ebccd1;
    color: #a94442;
}

.alert-success {
    background: #dff0d8;
    border-color: #d6e9c6;
    color: #3c763d;
}

.alert a {
    font-weight: 800;
}

.no-data {
    padding: 15px;
    background: #fff;
    border-left: 3px solid var(--pe-orange);
    color: var(--pe-muted);
}

.container-login {
    max-width: 360px;
    margin: 90px auto;
    padding: 20px;
    background: #fff;
    border-top: 3px solid var(--pe-orange);
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

.container-login h2 {
    margin: 0 0 18px;
    text-align: center;
    font-weight: 400;
}

.error-message {
    color: #dd4b39;
    font-size: 13px;
}

@media (max-width: 800px) {
    .main-header .logo {
        width: 64px;
        padding: 0;
    }

    .logo-mini {
        display: inline;
        font-weight: 800;
    }

    .logo-lg {
        display: none;
    }

    .navbar-title {
        display: none;
    }

    .sidebar {
        position: static;
        width: 100%;
        margin-top: 50px;
    }

    .content-area {
        margin-left: 0;
        padding-top: 18px;
    }

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

.inline-form {
    display: inline-flex;
    margin: 0;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge-activo {
    background: #00a65a;
}

.badge-inactivo {
    background: #dd4b39;
}

.dashboard-grid-3 {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.form-actions-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 14px;
}

.module-option {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 108px;
    padding: 14px 14px 12px;
    border: 1px solid #d2d6de;
    background: #fafbfc;
    cursor: pointer;
}

.module-option:hover {
    border-color: var(--pe-orange);
    background: #fff7f4;
}

.module-option input {
    width: 18px;
    height: 18px;
    margin: 0 0 4px;
}

.module-option-title {
    display: block;
    color: #1f2d3d;
    font-size: 14px;
    font-weight: 700;
}

.module-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.module-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 8px;
    background: #fff1eb;
    border: 1px solid #ffd3c2;
    color: #9b3c17;
    font-size: 12px;
    font-weight: 600;
}

.login-page-body {
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(135deg, #1b252b 0%, #24343d 46%, #f3f5f7 46%, #eef2f5 100%);
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(360px, 1.1fr) minmax(360px, 0.9fr);
    min-height: 100vh;
}

.login-brand-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 56px 56px 40px;
    color: #fff;
}

.login-brand-mark {
    position: relative;
    width: 96px;
    height: 72px;
}

.login-brand-mark span {
    position: absolute;
    display: block;
    border-radius: 50%;
    background: var(--pe-orange);
}

.login-brand-mark span:nth-child(1) {
    width: 48px;
    height: 48px;
    left: 0;
    bottom: 0;
}

.login-brand-mark span:nth-child(2) {
    width: 26px;
    height: 26px;
    left: 50px;
    top: 2px;
}

.login-brand-mark span:nth-child(3) {
    width: 14px;
    height: 14px;
    right: 0;
    bottom: 13px;
}

.login-eyebrow,
.login-kicker {
    margin: 0 0 14px;
    color: #ffb59d;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.login-brand-copy h1 {
    margin: 0 0 16px;
    font-size: 42px;
    line-height: 1.08;
    color: #fff;
}

.login-brand-copy p,
.login-support,
.login-brand-footer span {
    color: rgba(255, 255, 255, 0.82);
    font-size: 16px;
    line-height: 1.6;
}

.login-brand-footer {
    display: flex;
    gap: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.login-card-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-card {
    width: min(100%, 460px);
    padding: 34px 34px 30px;
    background: #fff;
    border-top: 4px solid var(--pe-orange);
    box-shadow: 0 24px 60px rgba(17, 24, 39, 0.18);
}

.login-card h2 {
    margin: 0 0 12px;
    font-size: 40px;
    font-weight: 400;
}

.login-support {
    margin: 0 0 24px;
    color: #697586;
    font-size: 15px;
    line-height: 1.5;
}

.login-form-grid {
    display: grid;
    gap: 14px;
}

.btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid #d73205;
    background: var(--pe-orange);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.btn-login:hover {
    background: var(--pe-orange-dark);
}

@media (max-width: 1100px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-brand-panel {
        padding-bottom: 16px;
    }

    .login-card-panel {
        padding-top: 0;
        padding-bottom: 40px;
    }
}

@media (max-width: 800px) {
    .dashboard-grid-3,
    .module-grid {
        grid-template-columns: 1fr;
    }

    .login-brand-panel,
    .login-card-panel {
        padding: 28px 20px;
    }

    .login-brand-copy h1 {
        font-size: 32px;
    }

    .login-card h2 {
        font-size: 32px;
    }

    .login-brand-footer {
        flex-direction: column;
        gap: 10px;
    }
}
