/* ============================================================
   Tema "Institucional Tec" — Órdenes Internas
   Capa sobre Bootstrap 4 / DataTables / SweetAlert.
   ============================================================ */

:root {
    --tec-navy: #0C2340;
    --tec-navy-2: #133257;
    --tec-blue: #0057B8;
    --tec-blue-dark: #00448f;
    --tec-blue-050: #eaf1fb;
    --bg: #f4f6f9;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --ok: #16a34a;
    --danger: #dc2626;
    --radius: 14px;
    --shadow: 0 4px 18px rgba(12, 35, 64, .08);
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    padding-bottom: 2rem;
}

/* -------- Navbar -------- */
.navbar.tec-nav {
    background: var(--tec-navy) !important;
    box-shadow: 0 2px 12px rgba(12, 35, 64, .18);
    padding: .55rem 1.25rem;
}

.tec-nav .navbar-brand {
    color: #fff !important;
    font-weight: 700;
    letter-spacing: .2px;
    display: flex;
    align-items: center;
    gap: .6rem;
}

.tec-nav .navbar-brand img {
    height: 34px;
    width: auto;
}

.tec-nav .nav-link {
    color: rgba(255, 255, 255, .82) !important;
    font-weight: 500;
    border-radius: 8px;
    padding: .4rem .9rem !important;
    transition: .15s;
}

.tec-nav .nav-link:hover,
.tec-nav .nav-link.active {
    color: #fff !important;
    background: rgba(255, 255, 255, .12);
}

.tec-nav .navbar-text {
    color: rgba(255, 255, 255, .9);
    font-weight: 500;
}

.tec-nav .navbar-toggler {
    border-color: rgba(255, 255, 255, .35);
}

.tec-nav .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.9)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* -------- Encabezados de página -------- */
.page-title {
    font-weight: 800;
    color: var(--tec-navy);
    margin: 1.9rem 0 1.4rem;
    text-align: center;
    font-size: 1.9rem;
}

.page-title::after {
    content: "";
    display: block;
    width: 64px;
    height: 4px;
    background: var(--tec-blue);
    border-radius: 4px;
    margin: .6rem auto 0;
}

/* -------- Tarjetas -------- */
.tec-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.9rem;
    margin-bottom: 1.5rem;
}

/* -------- Formularios -------- */
.tec-label {
    display: block;
    font-weight: 600;
    color: var(--tec-navy);
    margin-bottom: .35rem;
    font-size: .92rem;
}

.tec-label i {
    color: var(--tec-blue);
}

.tec-sublabel {
    display: block;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: .3rem;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.cds-item {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-left: 4px solid var(--tec-blue);
    border-radius: 10px;
    padding: 1rem 1rem .25rem;
    margin-bottom: .9rem;
}

.cds-actions {
    display: flex;
    gap: .6rem;
    margin: .1rem 0 1.5rem;
}

.form-control {
    border-radius: 10px;
    border: 1px solid var(--border);
    padding: .55rem .8rem;
    transition: .15s;
    color: var(--text);
}

.form-control:focus {
    border-color: var(--tec-blue);
    box-shadow: 0 0 0 .18rem rgba(0, 87, 184, .15);
}

textarea.form-control {
    min-height: 110px;
}

/* -------- Botones -------- */
.btn {
    border-radius: 10px;
    font-weight: 600;
    transition: .15s;
}

.btn-primary,
.btn-success {
    background: var(--tec-blue);
    border-color: var(--tec-blue);
}

.btn-primary:hover,
.btn-success:hover,
.btn-primary:focus,
.btn-success:focus {
    background: var(--tec-blue-dark);
    border-color: var(--tec-blue-dark);
    box-shadow: 0 0 0 .2rem rgba(0, 87, 184, .25);
}

.btn-info {
    background: var(--tec-blue);
    border-color: var(--tec-blue);
    color: #fff;
}

.btn-info:hover,
.btn-info:focus {
    background: var(--tec-blue-dark);
    border-color: var(--tec-blue-dark);
    color: #fff;
}

.btn-lg {
    padding: .7rem 1.2rem;
}

/* Agregar / quitar CDS */
#add-cd {
    background: var(--ok);
    border-color: var(--ok);
}

#minus-cd {
    background: var(--danger);
    border-color: var(--danger);
}

/* -------- Tabla / DataTables -------- */
table.dataTable {
    border-collapse: separate !important;
    border-spacing: 0;
    width: 100% !important;
}

table.dataTable thead th {
    background: var(--tec-navy) !important;
    color: #fff !important;
    border: none !important;
    font-weight: 600;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .4px;
    padding: .9rem .75rem;
}

table.dataTable thead th:first-child {
    border-top-left-radius: 10px;
}

table.dataTable thead th:last-child {
    border-top-right-radius: 10px;
}

table.dataTable tbody td {
    vertical-align: middle !important;
    padding: .7rem .75rem;
    border-top: 1px solid var(--border);
}

table.dataTable tbody tr:hover {
    background: var(--tec-blue-050);
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .35rem .6rem;
    outline: none;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--tec-blue);
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 8px !important;
    border: 1px solid var(--border) !important;
    color: var(--tec-navy) !important;
    background: #fff !important;
    margin: 0 2px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--tec-blue) !important;
    color: #fff !important;
    border-color: var(--tec-blue) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--tec-blue-050) !important;
    color: var(--tec-navy) !important;
    border-color: var(--tec-blue) !important;
}

/* -------- Modal -------- */
.modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 16px 50px rgba(12, 35, 64, .25);
    overflow: hidden;
}

.modal-header {
    background: var(--tec-navy);
    color: #fff;
    border-bottom: none;
}

.modal-header .close {
    color: #fff;
    text-shadow: none;
    opacity: .85;
}

.modal-title {
    font-weight: 700;
}

/* -------- Footer -------- */
.footer {
    position: static;
    background: #fff;
    border-top: 1px solid var(--border);
    color: var(--muted);
    height: auto;
    line-height: 1.5;
    padding: .85rem 0;
}

.footer p {
    margin: 0;
}

/* -------- Login -------- */
.tec-login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: linear-gradient(135deg, var(--tec-navy) 0%, var(--tec-blue) 100%);
}

.tec-login-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .28);
    padding: 2.6rem 2.1rem;
    max-width: 410px;
    width: 100%;
    text-align: center;
}

.tec-login-card h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--tec-navy);
    margin-bottom: 1.6rem;
    line-height: 1.45;
}

.tec-login-card .btn {
    width: 100%;
}

.tec-login-card .foot {
    color: var(--muted);
    font-size: .85rem;
    margin-top: 1.8rem;
    line-height: 1.4;
}
