@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;700&display=swap');

/* ============================================================
   CSS VARIABLES — DESIGN SYSTEM
   ============================================================ */
:root {
  /* Brand Colors */
  --color-primary: #244392;
  --color-primary-dark: #1B3270;
  --color-primary-light: #3F5FAF;
  --color-primary-ghost: rgba(36, 67, 146, 0.08);

  --color-secondary: #E1333B;
  --color-secondary-dark: #B8232C;
  --color-secondary-light: #F15A62;

  --color-accent-gold: #E8DFA8;
  --color-accent-gold-dark: #B08A5A;

  /* Semantic Colors */
  --success: #1e8e3e;
  --success-bg: #e6f4ea;
  --warning: #f9ab00;
  --warning-bg: #fef7e0;
  --danger: #d93025;
  --danger-bg: #fce8e6;
  --info: #1967d2;
  --info-bg: #e8f0fe;

  /* Neutrals */
  --color-white: #FFFFFF;
  --color-off-white: #F4F6FA;
  --color-light: #E9EEF5;
  --color-gray-100: #D9DDE5;
  --color-gray-200: #BFC7D4;
  --color-gray-500: #6B7280;
  --color-gray-600: #4B5563;
  --color-gray-700: #374151;
  --color-dark: #1F2937;
  --color-darkest: #111827;

  /* Legacy aliases */
  --primary-color: var(--color-primary);
  --primary-hover: var(--color-primary-dark);
  --bg-color: var(--color-off-white);
  --text-color: var(--color-dark);
  --border-color: #E2E8F0;
  --white: var(--color-white);
  --reserved-bg: #EEF2FF;
  --reserved-color: var(--color-primary-dark);

  /* Layout */
  --sidebar-width: 260px;
  --navbar-height: 62px;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 16px rgba(36,67,146,0.10);
  --shadow-lg: 0 10px 30px rgba(36,67,146,0.15);
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--color-primary-dark);
    font-weight: 700;
    line-height: 1.3;
}

a { color: inherit; text-decoration: none; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.text-muted { color: var(--color-gray-500); font-size: 12px; }
.text-primary { color: var(--color-primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    text-align: center;
    border: 1px solid transparent;
    padding: 9px 18px;
    font-size: 13.5px;
    line-height: 1.5;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
}

.btn-primary {
    color: var(--white);
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}
.btn-primary:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    box-shadow: 0 2px 8px rgba(36,67,146,0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    color: var(--white);
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
}
.btn-secondary:hover {
    background-color: var(--color-secondary-dark);
    transform: translateY(-1px);
}

.btn-outline {
    color: var(--color-gray-700);
    background-color: transparent;
    border-color: var(--border-color);
}
.btn-outline:hover {
    background-color: var(--color-light);
    border-color: var(--color-gray-200);
}

.btn-success {
    color: var(--white);
    background-color: var(--success);
}
.btn-success:hover { background-color: #166e2e; }

.btn-danger {
    color: var(--white);
    background-color: var(--danger);
}
.btn-danger:hover { background-color: var(--color-secondary-dark); }

.btn-block { display: flex; width: 100%; justify-content: center; }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 5px; }
.btn-lg { padding: 13px 24px; font-size: 15px; }
.btn-icon { padding: 8px 12px; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
    margin-bottom: 16px;
    text-align: left;
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-gray-700);
}
.form-control {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    background: var(--white);
    color: var(--text-color);
}
.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(36,67,146,0.1);
}
.form-control-readonly {
    background-color: var(--color-off-white);
    cursor: not-allowed;
    color: var(--color-gray-600);
}
.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 4px;
}
.w-50 { width: 50%; }

/* Field Grouping */
.form-section-divider {
    height: 1px;
    background: var(--border-color);
    margin: 20px 0;
    position: relative;
}
.form-section-divider::before {
    content: attr(data-label);
    position: absolute;
    top: -10px;
    left: 20px;
    background: var(--white);
    padding: 0 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-gray-500);
}

.hidden { display: none !important; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.alert-danger { background-color: var(--danger-bg); color: var(--danger); border: 1px solid #fad2cf; }
.alert-info { background-color: var(--info-bg); color: var(--info); border: 1px solid #d2e3fc; }
.alert-success { background-color: var(--success-bg); color: var(--success); border: 1px solid #b7dfbf; }
.alert-warning { background-color: var(--warning-bg); color: #7a5000; border: 1px solid #fde293; }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: inline-block;
}
.badge-success { background-color: var(--success-bg); color: var(--success); }
.badge-warning { background-color: var(--warning-bg); color: #8a5f00; }
.badge-danger { background-color: var(--danger-bg); color: var(--danger); }
.badge-info { background-color: var(--info-bg); color: var(--info); }
.badge-neutral { background-color: var(--color-light); color: var(--color-gray-600); }

/* ============================================================
   TOP NAVBAR
   ============================================================ */
.top-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    height: var(--navbar-height);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}
.nav-brand {
    font-family: 'Outfit', sans-serif;
    font-size: 17px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-primary-dark);
    text-decoration: none;
    min-width: 0;
}
.nav-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}
.nav-brand-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    padding-left: 12px;
    border-left: 2px solid var(--border-color);
    min-width: 0;
}
.nav-brand-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-primary-dark);
    letter-spacing: -0.2px;
    line-height: 1.2;
    white-space: nowrap;
}
.nav-brand-sub {
    font-size: 11px;
    font-weight: 500;
    color: var(--color-gray-500);
    letter-spacing: 0.2px;
    white-space: nowrap;
    text-transform: uppercase;
}
.nav-brand i {
    color: var(--color-primary);
    font-size: 22px;
}
.nav-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.navbar-clock {
    background: var(--color-primary-ghost);
    border: 1px solid var(--color-primary-light);
    padding: 2px 12px;
    border-radius: 20px;
    color: var(--color-primary-dark);
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.navbar-clock i {
    font-size: 11px;
    color: var(--color-primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.navbar-clock #clock-time {
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.3px;
}
.nav-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--color-primary-ghost);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: 16px;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.app-body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}
.app-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    width: var(--sidebar-width);
    background: var(--color-primary-dark);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
}
.sidebar-header {
    padding: 20px 16px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    padding: 14px 18px 6px;
}
.nav-menu {
    list-style: none;
    padding: 8px 0;
    flex: 1;
}
.nav-menu li a {
    display: flex;
    align-items: center;
    padding: 10px 18px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    gap: 12px;
    border-radius: 0;
    transition: var(--transition);
    border-left: 3px solid transparent;
    position: relative;
}
.nav-menu li a i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}
.nav-menu li a:hover {
    background-color: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.95);
}
.nav-menu li a.active {
    background: rgba(255,255,255,0.12);
    color: var(--white);
    border-left-color: var(--color-accent-gold);
    font-weight: 600;
}
.nav-menu li a.active i { color: var(--color-accent-gold); }

.sidebar-footer {
    padding: 12px 18px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    text-align: center;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
    flex: 1;
    padding: 22px;
    overflow-y: auto;
    background-color: var(--bg-color);
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}
.card:hover {
    box-shadow: var(--shadow);
}
.card-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.card-header h2, .card-header h3 {
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-header h2 i, .card-header h3 i {
    color: var(--color-primary);
}
.card-body {
    padding: 18px 20px;
    flex: 1;
    overflow-y: auto;
}

/* ============================================================
   TAB PAGE HEADER
   ============================================================ */
.tab-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
}
.tab-page-header h2 {
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.tab-page-header h2 i {
    color: var(--color-primary);
    font-size: 18px;
}

/* ============================================================
   CALENDAR LAYOUT
   ============================================================ */
.calendar-wrapper {
    display: flex;
    gap: 18px;
    height: 100%;
    min-height: 0;
}
.calendar-section {
    flex: 3;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.form-section {
    flex: 2;
    min-height: 0;
    overflow-y: auto;
}

/* ============================================================
   DATA TABLES — Professional
   ============================================================ */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.data-table thead th {
    background: var(--color-primary-dark);
    color: rgba(255,255,255,0.9);
    padding: 11px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    border: none;
}
.data-table thead th:first-child { border-radius: 0; }
.data-table thead th:last-child { border-radius: 0; }
.data-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}
.data-table tbody tr:nth-child(even) {
    background-color: #F9FAFB;
}
.data-table tbody tr:hover {
    background-color: var(--color-primary-ghost);
}
.data-table tbody td {
    padding: 11px 16px;
    color: var(--color-gray-700);
    vertical-align: middle;
}
.data-table tbody tr:last-child { border-bottom: none; }
.data-table td em, .data-table td.empty-state {
    color: var(--color-gray-500);
    font-style: italic;
    text-align: center;
    display: block;
    padding: 20px;
}

/* History filter bar */
.history-filter-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.history-filter-bar .form-control {
    flex: 1;
    min-width: 140px;
}

/* ============================================================
   KPI CARDS
   ============================================================ */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}
.kpi-card {
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    color: white;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.kpi-card::after {
    content: '';
    position: absolute;
    right: -15px;
    top: -15px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
}
.kpi-blue  { background: linear-gradient(135deg, #244392, #3F5FAF); }
.kpi-red   { background: linear-gradient(135deg, #E1333B, #c0212a); }
.kpi-green { background: linear-gradient(135deg, #1e8e3e, #2ea84e); }
.kpi-gold  { background: linear-gradient(135deg, #b08a5a, #c9a06c); }

.kpi-icon {
    font-size: 28px;
    opacity: 0.85;
    z-index: 1;
}
.kpi-body { z-index: 1; }
.kpi-value {
    font-family: 'Outfit', sans-serif;
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}
.kpi-label {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.85;
}

/* Stats / Config Grids */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 20px;
}
.config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 20px;
}

/* ============================================================
   SYSTEM INFO
   ============================================================ */
.system-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.sys-info-item {
    background: var(--color-off-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sys-info-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-gray-500);
}
.sys-info-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-primary-dark);
}

/* ============================================================
   TOGGLE SWITCH
   ============================================================ */
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 10px;
}
.toggle-switch input[type=checkbox] {
    height: 0;
    width: 0;
    visibility: hidden;
    position: absolute;
}
.toggle-switch label {
    cursor: pointer;
    text-indent: -9999px;
    width: 46px;
    height: 25px;
    background: var(--color-gray-200);
    display: block;
    border-radius: 25px;
    position: relative;
    transition: var(--transition);
}
.toggle-switch label:after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 19px;
    height: 19px;
    background: #fff;
    border-radius: 19px;
    transition: 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + label { background: var(--color-primary); }
.toggle-switch input:checked + label:after {
    left: calc(100% - 3px);
    transform: translateX(-100%);
}
.toggle-text { font-size: 13px; font-weight: 500; color: var(--color-gray-600); }

/* ============================================================
   MODALS
   ============================================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    overflow: auto;
    background-color: rgba(17,24,39,0.55);
    backdrop-filter: blur(3px);
}
.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 0;
    border: none;
    width: 560px;
    max-width: 95vw;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--color-off-white);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal-header h3 {
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.modal-header h3 i { color: var(--color-primary); }
.modal-body { padding: 22px; }
.modal-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.close-modal {
    color: var(--color-gray-500);
    font-size: 26px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
}
.close-modal:hover { color: var(--color-dark); }

/* Preview table inside modal */
.preview-table { width: 100%; border-collapse: collapse; }
.preview-table td { padding: 9px 4px; border-bottom: 1px solid var(--border-color); }
.preview-table td:first-child {
    font-weight: 600;
    width: 42%;
    color: var(--color-gray-500);
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ============================================================
   NOTIFICATIONS / TOASTS (PREMIUM)
   ============================================================ */
.notification-overlay {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.notification {
    min-width: 320px;
    padding: 16px 20px;
    border-radius: var(--radius);
    background: white;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 5px solid;
    animation: slideInRight 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}
.notification.error { border-left-color: var(--danger); }
.notification.info { border-left-color: var(--info); }
.notification.success { border-left-color: var(--success); }

.notification i { font-size: 20px; }
.notification.error i { color: var(--danger); }
.notification.info i { color: var(--info); }
.notification.success i { color: var(--success); }

.notification-content h4 { margin: 0 0 2px 0; font-size: 14px; color: var(--color-dark); }
.notification-content p { margin: 0; font-size: 12.5px; opacity: 0.8; }


/* ============================================================
   COMPUTERS / PROJECTOR SECTION
   ============================================================ */
.equip-toggle { display: flex; flex-direction: column; }
.projector-toggle { display: flex; flex-direction: column; }
.computers-details { padding-top: 8px; animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }

/* ============================================================
   AVAILABILITY BADGE
   ============================================================ */
#availability-badge {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    transition: var(--transition);
}

/* ============================================================
   LOCATION TABS
   ============================================================ */
.location-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* ============================================================
   FULLCALENDAR OVERRIDES
   ============================================================ */
#fullcalendar-box { height: 580px; font-family: 'Inter', sans-serif; }
.fc-theme-standard td, .fc-theme-standard th { border-color: var(--border-color) !important; }
.fc-toolbar-title {
    font-family: 'Outfit', sans-serif !important;
    color: var(--color-primary-dark) !important;
    font-weight: 700 !important;
}
.fc .fc-button-primary {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    font-family: 'Inter', sans-serif !important;
    text-transform: capitalize;
    border-radius: var(--radius-sm) !important;
}
.fc .fc-button-primary:not(:disabled):hover {
    background-color: var(--color-primary-dark) !important;
    border-color: var(--color-primary-dark) !important;
}
.fc .fc-button-primary:not(:disabled).fc-button-active {
    background-color: var(--color-accent-gold-dark) !important;
    border-color: var(--color-accent-gold-dark) !important;
    color: white !important;
}
.fc-col-header-cell-cushion { color: var(--color-primary) !important; text-decoration: none !important; font-weight: 600; }
.fc-timegrid-slot-label-cushion { color: var(--color-gray-500) !important; }

/* Selection Glow Preview on Calendar */
.fc-event-preview {
    background: rgba(30, 142, 62, 0.1) !important;
    border: 2px dashed var(--success) !important;
    color: var(--success) !important;
    font-weight: 700 !important;
    z-index: 10 !important;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(30, 142, 62, 0.2);
}
.fc-event-preview .fc-event-title {
    font-size: 11px !important;
    text-transform: uppercase;
}

.fc-event { border-radius: 5px !important; box-shadow: 0 1px 4px rgba(0,0,0,0.15); font-size: 12px !important; }
.fc-today-button { opacity: 0.8 !important; }

/* ============================================================
   FOOTER
   ============================================================ */
.app-footer {
    text-align: center;
    padding: 12px;
    font-size: 12px;
    color: var(--color-gray-500);
    background: var(--white);
    border-top: 1px solid var(--border-color);
}

/* ============================================================
   LOGIN PAGE — Hero Layout
   ============================================================ */
.hero-body { margin:0; padding:0; height:100vh; overflow:hidden; background:var(--white); }
.hero-container { display:flex; height:100vh; }
.hero-form-side {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--white);
    padding: 20px;
    position: relative;
    z-index: 2;
    box-shadow: 10px 0 30px rgba(0,0,0,0.03);
}
.hero-form-wrapper { width: 100%; max-width: 420px; }
.hero-image-side {
    flex: 1.5;
    background-image: url('../assets/login_bg_huasco.png');
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    animation: kenBurns 20s infinite alternate ease-in-out;
}
@keyframes kenBurns {
    0%   { transform: scale(1.0); }
    100% { transform: scale(1.15) translate(-2%, -1%); }
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(36, 67, 146, 0.4), rgba(0,0,0,0.6));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}
.hero-text-content { color:var(--white); text-align:center; max-width:600px; }
.hero-text-content h2 { font-size:40px; font-weight:700; margin-bottom:20px; line-height:1.2; color:white; }
.hero-text-content p { font-size:17px; font-weight:300; line-height:1.6; opacity:0.88; }

/* Login Card */
.login-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 28px;
}
.login-logo {
    width: 180px;
    height: auto;
    object-fit: contain;
    margin-bottom: 20px;
    display: block;
}
.login-icon { font-size:46px; color:var(--primary-color); }
.login-header h1 { font-size:24px; margin:0 0 6px; color:var(--color-primary-dark); font-weight:700; }
.login-header p { color:var(--color-gray-500); font-size:13.5px; margin:0; }
.login-footer { margin-top:18px; font-size:12px; color:var(--color-gray-500); text-align:center; }

/* Login input with icon */
.input-with-icon { position:relative; }
.input-with-icon i { position:absolute; left:12px; top:50%; transform:translateY(-50%); color:var(--color-gray-500); }
.input-with-icon input { padding-left:36px; }
.form-control-lg { padding:13px 16px 13px 40px; font-size:15px; }
.btn-lg { padding:13px 20px; font-size:15px; }

/* ============================================================
   PDF DOWNLOAD BUTTON
   ============================================================ */
.btn-download-pdf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-dark));
    color: var(--white);
    padding: 12px 26px;
    border-radius: 30px;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 4px 15px rgba(225,51,59,0.3);
    transition: var(--transition);
    border: none;
    cursor: pointer;
}
.btn-download-pdf:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(225,51,59,0.5);
}
.btn-download-pdf i { font-size:18px; }

/* ============================================================
   PUBLIC PAGE — No Sidebar
   ============================================================ */
.public-layout .sidebar { display: none; }

/* ============================================================
   RESPONSIVE — Sistema completo multi-dispositivo
   Breakpoints: 480 (mobile), 768 (tablet portrait),
                1024 (tablet landscape / small laptop), 1280 (notebook)
   ============================================================ */

/* Notebook (<=1280px) */
@media (max-width: 1280px) {
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid, .config-grid { grid-template-columns: 1fr; }
    .calendar-wrapper { gap: 16px; }
}

/* Tablet landscape / small laptop (<=1024px) */
@media (max-width: 1024px) {
    :root { --sidebar-width: 220px; }
    .top-navbar { padding: 0 16px; }
    .nav-brand-sub { display: none; }
    .nav-user { gap: 10px; }
    .nav-user > span { display: none; }  /* Oculta "Nombre (Rol)" en pantallas chicas */
    .navbar-clock { display: none; }     /* Oculta reloj, gana espacio */
    .calendar-wrapper { flex-direction: column; }
    .calendar-section, .form-section { width: 100%; }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .data-table { font-size: 12px; }
    .data-table th, .data-table td { padding: 8px 10px; }
    .modal-content { width: 90vw; max-width: 600px; }
}

/* Tablet portrait (<=768px) */
@media (max-width: 768px) {
    :root { --navbar-height: 56px; }

    /* Navbar */
    .top-navbar { padding: 0 12px; }
    .nav-logo { height: 32px; }
    .nav-brand-title { font-size: 14px; }
    .nav-brand-text { border-left: none; padding-left: 0; }
    .nav-brand { gap: 8px; }
    .nav-user { gap: 8px; }
    .nav-user > span { display: none; }
    .navbar-clock { display: none; }

    /* Layout: oculta sidebar, full-width content */
    .sidebar { display: none; }
    .main-content { padding: 12px; }
    .app-container { flex-direction: column; }

    /* Hero image side en login: oculta */
    .hero-image-side { display: none; }
    .hero-form-side { padding: 24px 16px; }
    .hero-form-wrapper { max-width: 100%; }

    /* Calendar & Form */
    .calendar-wrapper { flex-direction: column; gap: 12px; }
    .calendar-section, .form-section { width: 100% !important; min-width: 0; }
    .fullcalendar-box { min-height: 300px; }

    /* KPIs */
    .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .kpi-card { padding: 14px; }
    .kpi-value { font-size: 26px; }

    /* Tables: scroll horizontal */
    .card-body { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .data-table { font-size: 12px; min-width: 500px; }
    .data-table th, .data-table td { padding: 8px 8px; white-space: nowrap; }

    /* Filters bar */
    .filters-bar { flex-direction: column; gap: 8px; }
    .filters-bar .form-control { max-width: 100% !important; width: 100% !important; }
    .filters-bar input[type="text"] { max-width: 100% !important; }

    /* Tabs */
    .tab-page-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .tab-page-header h2 { font-size: 18px; }

    /* Modals */
    .modal-content { width: 96vw; max-width: 100%; margin: 10px auto; border-radius: 12px; }
    .modal-header { padding: 14px 16px; }
    .modal-body { padding: 14px 16px; }
    .modal-footer { padding: 12px 16px; flex-direction: column; gap: 8px; }
    .modal-footer .btn { width: 100%; justify-content: center; }

    /* Forms */
    .form-row { flex-direction: column; gap: 0; }
    .w-50 { width: 100%; }
    .w-100 { width: 100%; }

    /* Cards */
    .card { border-radius: 10px; }
    .card-header { padding: 12px 14px; flex-direction: column; align-items: flex-start; gap: 8px; }

    /* Stats grids */
    .stats-grid, .config-grid { grid-template-columns: 1fr; gap: 12px; }

    /* Pagination */
    .pagination-controls { flex-direction: column; align-items: center; gap: 8px; }
    .pagination-footer { padding: 8px 12px; }
}

/* Mobile portrait (<=480px) */
@media (max-width: 480px) {
    :root { --navbar-height: 52px; }

    body { font-size: 13px; }

    /* Navbar ultra-compacta */
    .top-navbar { padding: 0 10px; }
    .nav-logo { height: 28px; }
    .nav-brand-title { font-size: 13px; }
    .nav-brand-text { display: none; }   /* Solo logo en mobile pequeño */
    .btn-sm { padding: 4px 8px; font-size: 11px; }
    .btn-outline { padding: 6px 10px; font-size: 12px; }

    /* Login */
    .login-logo { width: 130px; }
    .login-header h1 { font-size: 20px; }
    .hero-form-side { padding: 16px 12px; }
    .btn-lg { padding: 12px 16px; font-size: 14px; }

    /* KPIs apilados */
    .kpi-grid { grid-template-columns: 1fr; gap: 8px; }
    .kpi-card { padding: 12px; }
    .kpi-value { font-size: 22px; }

    /* Calendario mínimo */
    .fc-toolbar-title { font-size: 14px !important; }
    .fc-button { font-size: 11px !important; padding: 4px 8px !important; }
    .fc-daygrid-event, .fc-timegrid-event { font-size: 10px !important; }
    .fullcalendar-box { min-height: 260px; }

    /* Tables */
    .data-table { font-size: 11px; }
    .data-table th, .data-table td { padding: 6px 6px; }

    /* Botones de acción en tablas */
    .btn-sm i { margin: 0; }

    /* Modales full-screen en mobile */
    .modal-content {
        width: 100vw;
        max-width: 100%;
        min-height: 100vh;
        border-radius: 0;
        margin: 0;
    }
    .modal {
        align-items: flex-start;
        padding: 0;
    }

    /* Formularios */
    .form-control { padding: 9px 11px; font-size: 14px; }
    .form-control-lg { padding: 12px 14px 12px 38px; font-size: 14px; }
    .form-group { margin-bottom: 12px; }

    /* Hub cards (index.php) */
    .hub-grid { grid-template-columns: 1fr; gap: 12px; }
    .hub-card { padding: 20px; }
    .hub-icon-wrapper { width: 50px; height: 50px; font-size: 22px; }

    /* Footer */
    .app-footer { padding: 12px; font-size: 11px; }
    .app-footer p { text-align: center; }
}

/* ============================================================
   SIDEBAR BADGE — Equipment Pending Alert
   ============================================================ */
.sidebar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: #E1333B;
    color: white;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    margin-left: 4px;
    animation: pulse-badge 2s infinite;
}
@keyframes pulse-badge {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

/* ============================================================
   EQUIPMENT RETURN — Status Cards
   ============================================================ */
.equipment-status-option {
    flex: 1;
    cursor: pointer;
}
.equipment-status-option input[type=radio] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.equipment-status-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 12px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    font-weight: 600;
    font-size: 13px;
    transition: var(--transition);
    cursor: pointer;
    text-align: center;
}
.equipment-status-card i { font-size: 22px; }
.status-returned { background: var(--success-bg); color: var(--success); }
.status-incident { background: var(--warning-bg); color: #7a4f00; }
.equipment-status-option input[type=radio]:checked + .status-returned {
    border-color: var(--success);
    box-shadow: 0 0 0 3px rgba(30,142,62,0.15);
}
.equipment-status-option input[type=radio]:checked + .status-incident {
    border-color: var(--warning);
    box-shadow: 0 0 0 3px rgba(249,171,0,0.2);
}

/* Equipment badges in history table */
.badge-equipment-pending { background-color: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }
.badge-equipment-returned { background-color: var(--success-bg); color: var(--success); }
.badge-equipment-incident { background-color: var(--warning-bg); color: #7a4f00; border: 1px solid #fde293; }

/* ============================================================
   EDIT MODAL FOOTER — Improved Layout
   ============================================================ */
.edit-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 16px 22px !important;
}
.edit-modal-left-actions {
    display: flex;
    gap: 6px;
}
.edit-modal-right-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* ============================================================
   CONFIRM CANCEL MODAL — Professional Styled Confirmation
   ============================================================ */
.confirm-cancel-content {
    width: 440px !important;
    max-width: 95vw;
    text-align: center;
    border-radius: var(--radius-lg) !important;
    overflow: hidden;
}
.confirm-cancel-header {
    padding: 32px 28px 20px;
}
.confirm-cancel-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FEE2E2, #FECACA);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.confirm-cancel-icon i {
    font-size: 28px;
    color: #DC2626;
}
.confirm-cancel-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 8px;
}
.confirm-cancel-header p {
    font-size: 13.5px;
    color: var(--color-gray-600);
    line-height: 1.6;
    max-width: 340px;
    margin: 0 auto;
}
.confirm-cancel-info {
    margin: 0 28px 20px;
    padding: 14px 18px;
    background: var(--color-off-white);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--color-gray-700);
    line-height: 1.7;
    text-align: left;
}
.confirm-cancel-info strong {
    color: var(--color-primary-dark);
}
.confirm-cancel-actions {
    display: flex;
    gap: 10px;
    padding: 16px 28px 28px;
    justify-content: center;
}
.confirm-cancel-actions .btn {
    min-width: 140px;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 600;
}
.confirm-cancel-actions .btn-danger {
    background: linear-gradient(135deg, #DC2626, #B91C1C);
    border: none;
    box-shadow: 0 4px 14px rgba(220,38,38,0.3);
}
.confirm-cancel-actions .btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(220,38,38,0.45);
}

/* ============================================================
   NOTIFICATION BELL
   ============================================================ */
.notification-bell-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.notification-bell-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: 18px;
    transition: background 0.2s, transform 0.2s;
}
.notification-bell-btn:hover {
    background: var(--color-primary-ghost);
    transform: scale(1.1);
}
@keyframes bell-ring {
    0%   { transform: rotate(0deg); }
    15%  { transform: rotate(15deg); }
    30%  { transform: rotate(-10deg); }
    45%  { transform: rotate(10deg); }
    60%  { transform: rotate(-5deg); }
    75%  { transform: rotate(5deg); }
    100% { transform: rotate(0deg); }
}
.notification-bell-btn.bell-ring i {
    animation: bell-ring 0.6s ease;
}

.notification-badge {
    position: absolute;
    top: 2px; right: 2px;
    background: var(--color-secondary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    pointer-events: none;
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 360px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    z-index: 2000;
    overflow: hidden;
    animation: dropdownFadeIn 0.2s ease;
}
@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.notification-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    color: white;
    font-size: 13px;
    font-weight: 600;
}
.btn-clear-notif {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-clear-notif:hover { background: rgba(255,255,255,0.35); }

.notification-list {
    max-height: 340px;
    overflow-y: auto;
    padding: 8px 0;
}
.notif-empty {
    text-align: center;
    color: #888;
    font-size: 13px;
    padding: 30px 16px;
    margin: 0;
}

.notif-item {
    display: flex;
    gap: 12px;
    padding: 10px 16px;
    transition: background 0.15s;
    cursor: default;
}
.notif-item:hover { background: var(--color-off-white); }
.notif-item--unread { background: #EEF3FF; }
.notif-item--unread:hover { background: #e3eaff; }

.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}
.notif-icon--new_reservation       { background: var(--info-bg); color: var(--info); }
.notif-icon--equipment_returned     { background: var(--success-bg); color: var(--success); }
.notif-icon--equipment_incident     { background: var(--danger-bg); color: var(--danger); }

.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: 13px; font-weight: 600; color: var(--color-text); }
.notif-detail { font-size: 12px; color: #666; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-time { font-size: 11px; color: #aaa; margin-top: 3px; }

/* ============================================================
   DEVOLUCIONES TAB FILTER BAR
   ============================================================ */
.devolucion-filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.devolucion-tab-btn {
    padding: 8px 18px;
    border-radius: 30px;
    border: 1.5px solid #dde3ef;
    background: white;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.devolucion-tab-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-primary-ghost);
}
.devolucion-tab-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(36,67,146,0.25);
}

/* ============================================================
   LOGIN — BACK TO HOME BUTTON
   ============================================================ */
.btn-back-home {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding: 11px 0;
    width: 100%;
    border-radius: 12px;
    border: 1.5px solid var(--border-color);
    background: white;
    color: var(--color-gray-600);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}
.btn-back-home:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-primary-ghost);
    transform: translateY(-1px);
}
.btn-back-home i {
    font-size: 13px;
    transition: transform 0.2s;
}
.btn-back-home:hover i {
    transform: translateX(-3px);
}

/* ============================================================
   TICKET NUMBER DISPLAY
   ============================================================ */
.ticket-number {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, var(--color-primary-ghost), rgba(36,67,146,0.12));
    color: var(--color-primary-dark);
    border: 1px solid rgba(36,67,146,0.15);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Hero ticket display inside the success modal */
.ticket-badge-hero {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
    color: white;
    border-radius: 40px;
    font-size: 20px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    box-shadow: 0 6px 20px rgba(36,67,146,0.3);
    animation: ticketAppear 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.ticket-badge-hero i {
    font-size: 22px;
    opacity: 0.85;
}
@keyframes ticketAppear {
    from { transform: scale(0.7); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

/* ============================================================
   FAQ MODAL SYSTEM
   ============================================================ */
.faq-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: var(--transition);
}
.faq-item:hover { border-color: var(--color-primary-light); }
.faq-question {
    width: 100%;
    padding: 14px 18px;
    background: var(--color-off-white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: var(--color-primary-dark);
}
.faq-question i {
    transition: transform 0.3s ease;
    font-size: 12px;
    opacity: 0.7;
}
.faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--white);
    font-size: 13.5px;
    line-height: 1.6;
}
.faq-answer-inner { padding: 16px 18px; border-top: 1px solid var(--border-color); }
.faq-item.active .faq-answer { max-height: 500px; }
.faq-item.active .faq-question { background: var(--color-primary-ghost); }
.faq-item.active .faq-question i { transform: rotate(180deg); }

.help-sidebar-item {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.help-sidebar-item a {
    color: var(--color-accent-gold) !important;
    font-weight: 700 !important;
}

@keyframes modalBackdrop {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes modalContentPop {
    from { transform: scale(0.95) translateY(10px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}
