:root {
    /* Color Palette - Brighter Modern Light Profile (Celeste) */
    --celeste: #f0f9ff;
    --celeste-transparent: rgba(255, 255, 255, 0.80);
    --primary: #0ea5e9;
    --primary-hover: #0284c780;
    --secondary: #94a3b8;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --bg-main: #ffffff;
    --bg-surface: #ffffff;
    --bg-sidebar: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-color: #0ea5e9;
    /* Sharper Celeste border */
    --border-radius: 8px;
    --border-radius-sm: 4px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --soft-green: #f0fdf4;
    --soft-green-dark: #22c55e;
    --soft-green-hover: #dcfce7;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


.glass-card {
    background: rgba(255, 255, 255, 0.1);
    /* efecto vidrio */
    backdrop-filter: blur(15px);
    /* desenfoque */
    padding: 20px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
}


.key-3d {
    display: inline-block;
    filter: drop-shadow(4px 4px 0px rgba(2, 132, 199, 0.3)) drop-shadow(-1px -1px 0px rgba(255, 255, 255, 0.8));
    transform: perspective(500px) rotateY(-5deg) rotateX(5deg);
    transition: var(--transition);
}

.key-3d:hover {
    transform: perspective(500px) rotateY(0deg) rotateX(0deg) scale(1.1);
}

body {
    background: #ffffff;
    color: var(--text-primary);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    overflow-x: hidden;
    min-height: 100vh;
    font-size: 0.68rem !important;
}

/* Typography (+2pt increase for headings) */
h1 {
    font-size: 1.4rem !important;
}

h2 {
    font-size: 1.22rem !important;
}

h3 {
    font-size: 1.1rem !important;
}

h4 {
    font-size: 1.0rem !important;
}

h5 {
    font-size: 0.9rem !important;
}

h6 {
    font-size: 0.8rem !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    margin-top: 0 !important;
}

/* Page Layout */
.page {
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.content {
    padding-top: 0.25rem !important;
}

/* Global container padding top reduction & tighter title row margin */
.container-fluid.py-3,
.container-fluid.py-4,
.container-fluid.p-4,
.container-fluid {
    padding-top: 0.25rem !important;
}

.container-fluid > .d-flex.justify-content-between,
.main-content-frame .d-flex.justify-content-between,
.d-flex.justify-content-between.align-items-center.mb-3,
.d-flex.justify-content-between.align-items-center {
    margin-bottom: 0.35rem !important;
}

/* Cards */
.card {
    background: var(--bg-surface);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.23);
}

.card-header {
    background-color: transparent;
    border-bottom: 2px solid var(--border-color);
    padding: 0.5rem 1rem;
    min-height: 45px;
    display: flex;
    align-items: center;
}

/* Page Frame Layout */
.main-wrapper {
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content-frame {
    flex: 1;
    background: white;
    /* Outer border removed per user request */
    border-radius: 0;
    box-shadow: none;
    padding: 0.25rem 0.75rem 0.5rem 0.75rem !important;
    overflow-y: auto;
}

.top-bar-frame {
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
    font-size: 0.65rem
}

/* Buttons */
.btn {
    border-radius: var(--border-radius-sm);
    padding: 0.4rem 0.8rem;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.68rem;
}

.btn-primary {
    background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 14px 0 rgba(2, 132, 199, 0.39);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.23);
}

/* Forms */
.form-control,
.form-select {
    border-radius: var(--border-radius-sm);
    border: 2px solid var(--border-color);
    padding: 0.3rem 1rem;
    transition: var(--transition);

    font-weight: 400;

}

.form-control:focus {
    border-color: #0284c7;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15);
}

.sidebar {
    width: 250px;
    gap: 0px;
    height: 100vh;
    background: #ffffff;
}

.navbar-brand {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--soft-green-dark) !important;
    padding: 1rem 1.5rem;
    display: block;
}

/* Ícono Chevron Personalizado para NavMenu */
.nav-arrow-down,
.nav-arrow-right {
    display: inline-block;
    width: 0.75rem;
    height: 0.75rem;
    vertical-align: middle;
    margin-left: auto;
    /* Push to the right */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.nav-arrow-down {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2316a34a' class='bi bi-chevron-down' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
}

.nav-arrow-right {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2316a34a' class='bi bi-chevron-right' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
}

/* Enlace de navegación - Light Sidebar Adjustment */
.nav-link {
    display: flex;
    align-items: center;
    padding: 0.2rem 1rem;
    border-radius: 2px;
    color: aliceblue;
    /* Slate 600 - Darker gray for contrast */
    background: none;
    border: none;
    font-size: 0.72rem;
    text-decoration: none;
    cursor: pointer;
    width: 100%;
}

.nav-item {
    color: var(--text-secondary);
    padding: 1px 0.5rem;
    margin-bottom: 0;
}

/* Submenu specific styles */
.nav-sub-link {
    display: flex;
    padding: 0.1rem 0.5rem !important;
    font-size: 0.58rem !important;
    line-height: 1.25 !important;
    color: #1e293b !important;
    min-height: 24px;
    font-weight: 500 !important;
}

.nav-sub-link span {
    font-size: 0.58rem !important;
}

.ps-5 .nav-sub-link,
.ps-5 .nav-sub-link span {
    font-size: 0.56rem !important;
}

.nav-sub-link i:first-child {
    font-size: 0.68rem !important;
    width: 0.85rem !important;
    margin-right: 0.35rem !important;
    color: #3b82f6 !important;
}


.nav-link i:first-child {
    font-size: 1.1rem;
    color: var(--soft-green-dark);
    margin-right: 0.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
}

.nav-link:hover {
    background-color: var(--soft-green-hover);
    color: var(--soft-green-dark);
    transform: translateX(2px);
}

.nav-link.active {
    background-color: var(--soft-green);
    color: var(--soft-green-dark);
    font-weight: 600;
    border-right: 4px solid var(--soft-green-dark);
}

/* Custom Scrollbar - Hidden */
::-webkit-scrollbar {
    display: none;
}


::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

* {
    scrollbar-width: none;
    -ms-overflow-style: none;
}



/* QuickGrid Alignment and Styling */
.quickgrid {
    width: 100%;
}

.quickgrid th {
    background-color: var(--soft-green) !important;
    color: var(--text-primary) !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.02em;
    padding: 0.4rem 0.6rem !important;
    border-bottom: 2px solid var(--border-color) !important;
}

.quickgrid td {
    padding: 0.3rem 0.62rem !important;
    vertical-align: middle;
}

/* Ensure column title and sort icon alignment */
.quickgrid .col-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quickgrid .sort-indicator {
    opacity: 0.4;
}

.quickgrid th.col-justify-right .col-title {
    justify-content: flex-end;
}

.quickgrid th.col-justify-center .col-title {
    justify-content: center;
}

.quickgrid td.col-justify-right {
    text-align: right;
}

.quickgrid td.col-justify-center {
    text-align: center;
}

/* Compact Layout Utilities */
.text-xs {
    font-size: 0.71rem !important;
}

.table-compact th,
.table-compact td {
    padding: 0.2rem 0.4rem !important;
    font-size: 0.75rem !important;
    vertical-align: middle;
}

.btn-xs {
    padding: 0.1rem 0.4rem !important;
    font-size: 0.7rem !important;
    line-height: 1.2;
}

/* Fused Table Style: Removes gaps and borders between cells and inputs */
.table-fused {
    border-collapse: collapse !important;
}

.table-fused th {
    padding: 0.2rem 0.5rem !important;
    border: 1px solid var(--border-color) !important;
}

.table-fused td {
    padding: 0 !important;
    border: 1px solid #e2e8f0 !important;
    height: 24px;
}

.table-fused .form-control-xs,
.table-fused .form-select-xs,
.table-fused .btn-xs {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    background-color: transparent;
}

.table-fused .form-control-xs:focus,
.table-fused .form-select-xs:focus {
    background-color: #fff !important;
    outline: 2px solid var(--primary) !important;
    z-index: 10;
}

.table-fused tr:hover td {
    background-color: rgba(14, 165, 233, 0.02);
}

.form-control-xs,
.form-select-xs {
    padding: 0.1rem 0.1rem !important;
    font-size: 0.7rem !important;
    min-height: 18px;
}

.input-group-xs .input-group-text,
.input-group-xs .form-control {
    padding: 0.1rem 0.3rem !important;
    font-size: 0.75rem !important;
    min-height: 24px;
}

/* Custom Table - Compact Style for high density data */
.custom-table thead th {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    padding: 0.3rem 0.5rem !important;
    background-color: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    color: #64748b;
}

.custom-table tbody td {
    padding: 0.15rem 0.5rem !important;
    font-size: 0.68rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.custom-table tbody tr:hover {
    background-color: rgba(14, 165, 233, 0.04);
}

/* Status LED Indicators */
.status-led-group {
    display: flex;
    gap: 6px;
    align-items: center;
    padding: 4px 8px;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.status-led {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    transition: all 0.3s ease;
}

.led-green {
    background-color: #22c55e;
    box-shadow: 0 0 4px rgba(34, 197, 94, 0.6);
}

.led-red {
    background-color: #ef4444;
    box-shadow: 0 0 4px rgba(239, 68, 68, 0.6);
}

.led-off {
    background-color: #e2e8f0;
    box-shadow: none;
    opacity: 0.2;
}

.printer-status-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 2px;
    border-left: 1px solid #e2e8f0;
    margin-left: 0px;
}

.printer-icon-btn {
    color: #64748b;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.printer-icon-btn:hover {
    color: #3b82f6;
}