/* =========================
   BASE
========================= */

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto;
    background: #f4f6f8;
    color: #2d3436;
}

/* =========================
   LOGIN (REDISEÑO)
========================= */

.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #2c3e50, #34495e);
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-card {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    padding: 2.5rem 2.75rem;
    border-radius: 14px;
    box-shadow: 0 25px 50px rgba(0,0,0,.25);
    animation: loginFade .4s ease-out;
}

@keyframes loginFade {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.login-title {
    font-size: 1.6rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: .25rem;
    color: #2c3e50;
}

.login-subtitle {
    text-align: center;
    font-size: .95rem;
    color: #7f8c8d;
}

.login-card .form-label {
    font-weight: 500;
    color: #2d3436;
}

.login-card .form-control {
    border-radius: 8px;
    padding: .65rem .85rem;
}

.login-card .form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 .2rem rgba(52,152,219,.15);
}

.login-card .btn-primary {
    background: #3498db;
    border: none;
    font-weight: 600;
    letter-spacing: .2px;
}

.login-card .btn-primary:hover {
    background: #2980b9;
}

.login-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: .8rem;
    color: #95a5a6;
}


/* =========================
   LAYOUT
========================= */

.app-container {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 260px;
    background: #2c3e50;
    color: #ecf0f1;
    padding: 1.2rem 1rem;
}

.sidebar-brand {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.app-header {
    background: #ffffff;
    padding: 1rem 2rem;
    border-bottom: 1px solid #e1e4e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-content {
    padding: 2rem;
}

.content-wrapper {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
}

.app-footer {
    padding: .75rem 2rem;
    font-size: .85rem;
    color: #7f8c8d;
    border-top: 1px solid #e1e4e8;
    display: flex;
    justify-content: space-between;
}

/* =========================
   MENU (REDISEÑO)
========================= */

.menu {
    margin-top: 1rem;
}

.menu-sections {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-section {
    margin-bottom: 1.5rem;
}

.menu-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #95a5a6;
    margin: 1rem 0 .5rem .5rem;
}

.menu-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-item {
    margin-bottom: .15rem;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .6rem .75rem;
    border-radius: 8px;
    color: #ecf0f1;
    text-decoration: none;
    font-size: .95rem;
    transition: background .2s ease, padding-left .2s ease;
}

.menu-link:hover {
    background: rgba(255,255,255,.08);
    padding-left: 1rem;
}

.menu-link.active {
    background: linear-gradient(135deg, #3498db, #2980b9);
    font-weight: 600;
}

/* Punto decorativo */
.menu-dot {
    width: 6px;
    height: 6px;
    background: rgba(255,255,255,.4);
    border-radius: 50%;
}

.menu-link.active .menu-dot {
    background: #ffffff;
}


/* =========================
   FORMS (REDESIGN)
========================= */

.form-section {
    background: #ffffff;
    border-radius: 10px;
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

.form-section-title {
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    font-weight: 500;
    margin-bottom: .35rem;
}

.form-text {
    font-size: .8rem;
    color: #7f8c8d;
}

.form-control,
.form-select {
    padding: .6rem .75rem;
    font-size: .95rem;
}

/* Radios / checks */
.form-check-label {
    font-weight: 500;
}
/* =========================
   BUTTONS
========================= */

.btn {
    border-radius: 8px;
    padding: .45rem 1rem;
}

.btn-primary {
    background: #3498db;
    border: none;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-success {
    background: #2ecc71;
    border: none;
}

.btn-success:hover {
    background: #27ae60;
}

.btn-outline-primary {
    border-color: #3498db;
    color: #3498db;
}

.btn-outline-primary:hover {
    background: #3498db;
    color: #fff;
}

/* =========================
   TABLES (REDESIGN)
========================= */

.table-wrapper {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: #f8f9fb;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #6c757d;
    border-bottom: 1px solid #e1e4e8;
}

.table tbody td {
    vertical-align: middle;
    padding: .75rem;
}

.table-hover tbody tr:hover {
    background: #f4f6f8;
}

/* Badges */
.badge {
    padding: .4em .65em;
    font-weight: 500;
    border-radius: 999px;
}

/* =========================
   ACTION BAR
========================= */

.page-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

/* =========================
   FORMS – UPGRADE
========================= */

.form-label {
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: .35rem;
}

.form-control,
.form-select {
    border-radius: 8px;
    padding: .55rem .75rem;
    border: 1px solid #dcdfe3;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 .15rem rgba(52,152,219,.15);
}

.form-text {
    font-size: .8rem;
    color: #7f8c8d;
}

/* =========================
   CARDS – FORMS
========================= */

.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,.06);
}

.card-header {
    background: #f8f9fb;
    font-weight: 600;
    border-bottom: 1px solid #e5e8ec;
}

/* =========================
   TABLES – UPGRADE
========================= */

.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #636e72;
    background: #f8f9fb;
    border-bottom: 2px solid #e5e8ec;
}

.table tbody tr {
    transition: background .12s ease;
}

.table tbody tr:hover {
    background: #f1f5f9;
}

.table td,
.table th {
    padding: .75rem .75rem;
    vertical-align: middle;
}

/* =========================
   BADGES
========================= */

.badge {
    padding: .45em .65em;
    font-weight: 600;
    border-radius: 6px;
}

/* =========================
   ACTION BUTTONS
========================= */

.btn {
    font-weight: 500;
}

.btn-success {
    background: #27ae60;
    border: none;
}

.btn-success:hover {
    background: #1e8449;
}

.btn-secondary {
    background: #bdc3c7;
    border: none;
    color: #2d3436;
}

.btn-secondary:hover {
    background: #aab2b7;
}

/* =========================
   TABLE ACTION BAR
========================= */

.table-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* =========================
   FORMS (ENHANCED)
========================= */

.form-label {
    font-weight: 500;
    color: #34495e;
}

.form-control-lg {
    padding: .75rem 1rem;
    font-size: 1rem;
}

.card-header {
    background: #f8fafc;
}

/* =========================
   TABLES (ENHANCED)
========================= */

.table thead th {
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #7f8c8d;
}

.table-hover tbody tr:hover {
    background-color: #f4f8fb;
}

/* =========================
   BUTTONS
========================= */

.btn-success {
    background: #2ecc71;
    border: none;
}

.btn-success:hover {
    background: #27ae60;
}

.btn-outline-secondary {
    border-color: #dfe6e9;
    color: #636e72;
}

.btn-outline-secondary:hover {
    background: #ecf0f1;
}

/* =========================
   HEADER – REDISEÑO
========================= */

.app-header {
    background: #ffffff;
    padding: .75rem 1.5rem;
    border-bottom: 1px solid #e5e8ec;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left .btn-obra {
    background: #f1f5f9;
    border-radius: 10px;
    padding: .4rem .75rem;
    border: none;
    text-align: left;
}

.header-label {
    display: block;
    font-size: .65rem;
    text-transform: uppercase;
    color: #7f8c8d;
    line-height: 1;
}

.header-right {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.btn-icon {
    background: transparent;
    border: none;
    font-size: 1.1rem;
    padding: .35rem .5rem;
    border-radius: 8px;
}

.btn-icon:hover {
    background: #f1f5f9;
}

.btn-user {
    background: #ecf0f1;
    border-radius: 999px;
    padding: .35rem .9rem;
    border: none;
    font-weight: 500;
}

