/* devanagari */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 100;
  font-display: swap;
  src: url(../fonts/poppins/pxiGyp8kv8JHgFVrLPTucXtAKPY.woff2) format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
}
/* latin-ext */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 100;
  font-display: swap;
  src: url(../fonts/poppins/pxiGyp8kv8JHgFVrLPTufntAKPY.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 100;
  font-display: swap;
  src: url(../fonts/poppins/pxiGyp8kv8JHgFVrLPTucHtA.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* devanagari */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url(../fonts/poppins/pxiByp8kv8JHgFVrLFj_Z11lFc-K.woff2) format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
}
/* latin-ext */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url(../fonts/poppins/pxiByp8kv8JHgFVrLFj_Z1JlFc-K.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url(../fonts/poppins/pxiByp8kv8JHgFVrLFj_Z1xlFQ.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* devanagari */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(../fonts/poppins/pxiByp8kv8JHgFVrLDz8Z11lFc-K.woff2) format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
}
/* latin-ext */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(../fonts/poppins/pxiByp8kv8JHgFVrLDz8Z1JlFc-K.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url(../fonts/poppins/pxiByp8kv8JHgFVrLDz8Z1xlFQ.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* devanagari */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/poppins/pxiEyp8kv8JHgFVrJJbecmNE.woff2) format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
}
/* latin-ext */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/poppins/pxiEyp8kv8JHgFVrJJnecmNE.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/poppins/pxiEyp8kv8JHgFVrJJfecg.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* devanagari */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/poppins/pxiByp8kv8JHgFVrLGT9Z11lFc-K.woff2) format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
}
/* latin-ext */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/poppins/pxiByp8kv8JHgFVrLGT9Z1JlFc-K.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/poppins/pxiByp8kv8JHgFVrLGT9Z1xlFQ.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* devanagari */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/poppins/pxiByp8kv8JHgFVrLEj6Z11lFc-K.woff2) format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
}
/* latin-ext */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/poppins/pxiByp8kv8JHgFVrLEj6Z1JlFc-K.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/poppins/pxiByp8kv8JHgFVrLEj6Z1xlFQ.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* devanagari */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/poppins/pxiByp8kv8JHgFVrLCz7Z11lFc-K.woff2) format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
}
/* latin-ext */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/poppins/pxiByp8kv8JHgFVrLCz7Z1JlFc-K.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/poppins/pxiByp8kv8JHgFVrLCz7Z1xlFQ.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* devanagari */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(../fonts/poppins/pxiByp8kv8JHgFVrLDD4Z11lFc-K.woff2) format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
}
/* latin-ext */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(../fonts/poppins/pxiByp8kv8JHgFVrLDD4Z1JlFc-K.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(../fonts/poppins/pxiByp8kv8JHgFVrLDD4Z1xlFQ.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* devanagari */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url(../fonts/poppins/pxiByp8kv8JHgFVrLBT5Z11lFc-K.woff2) format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF, U+11B00-11B09;
}
/* latin-ext */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url(../fonts/poppins/pxiByp8kv8JHgFVrLBT5Z1JlFc-K.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url(../fonts/poppins/pxiByp8kv8JHgFVrLBT5Z1xlFQ.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --white-always: #fff;
    --primary-clr: #4f46b9;
    --bg-clr: #f2f4f5;
    --bg-clr_opa: rgba(255, 255, 255, 0.5);
    --white-bg: #fff;
    --white-bg-rgba: rgba(255, 255, 255, 0.5);
    --subwhite-bg: #fff;
    --subwhite-bg-rgba: rgba(255, 255, 255, 0.85);
    --dark-text-clr: #25396f;
    --light-text-clr: #fff;
    --hover-clr: #f3f4f6;
    --button-clr: #4f46b9;
    --button-clr-hover: #5a4ce6;
    /* --action-clr: #ff693c; */
    --action-clr: #2563eb;
    --button-active-clr: #4f46b9;
    --input-bg: #f2f4f5;

    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #1e293b;
    --accent-color: #f97316;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-light: #cbd5e1;
    --bg-primary: #ffffff;
    --bg-primary-opacity-80: rgba(255, 255, 255, 0.8);
    --bg-primary-opacity-60: rgba(255, 255, 255, 0.6);
    --bg-primary-opacity-40: rgba(255, 255, 255, 0.4);
    --bg-primary-opacity-20: rgba(255, 255, 255, 0.2);
    --bg-secondary: #f8fafc;
    --border-color: #e2e8f0;
    --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 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --header-height: 80px;
}

/* Dark mode */
body.dark-mode {
    --primary-clr: #4f46b9;
    --bg-clr: #1e1e1e;
    --bg-clr_opa: rgba(0, 0, 0, 0.5);
    --white-bg: #23262b;
    --white-bg-rgba: rgba(35, 38, 43, 0.5);
    --subwhite-bg: #353a42;
    --subwhite-bg-rgba: rgba(53, 58, 66, 0.85);
    --dark-text-clr: #fff;
    --light-text-clr: #fff;
    --hover-clr: #374151;
    --input-bg: #353a42;
    
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-light: #64748b;
    --bg-primary: #0f172a;
    --bg-primary-opacity-80: rgba(15, 23, 42, 0.8);
    --bg-primary-opacity-60: rgba(15, 23, 42, 0.6);
    --bg-primary-opacity-40: rgba(15, 23, 42, 0.4);
    --bg-primary-opacity-20: rgba(15, 23, 42, 0.2);
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --border-color: #475569;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
    
    transition: all 0.3s ease !important;
    
}

.modal {
    position: fixed;
    inset: 0;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    box-sizing: border-box;
    overflow: auto;
  }

.modal-content {
    background-color: var(--subwhite-bg) !important;
    border-radius: 20px !important;
}

.swal2-popup {
    border-radius: 20px;
    background-color: var(--subwhite-bg) !important;
}

.form-control {
    background-color: var(--input-bg) !important;
    color: var(--dark-text-clr) !important;
}

.text-green-600 {
    color: var(--green-600) !important;
}

.text-violet-700 {
    color: var(--violet-700) !important;
}

.text-blue-500 {
    color: var(--blue-500) !important;
}
.text-blue-600 {
    color: var(--blue-600) !important;
}
.text-blue-700 {
    color: var(--blue-700) !important;
}
.text-blue-800 {
    color: var(--blue-800) !important;
}
.text-blue-900 {
    color: var(--blue-900) !important;
}
.text-blue-950 {
    color: var(--blue-950) !important;
}

.text-rose-500 {
    color: var(--rose-500) !important;
}

.text-rose-600 {
    color: var(--rose-600) !important;
}

.text-fuchsia-600 {
    color: var(--fuchsia-600) !important;
}

.text-lime-500 {
    color: var(--lime-500) !important;
}

.text-lime-600 {
    color: var(--lime-600) !important;
}

.text-lime-700 {
    color: var(--lime-700) !important;
}

.text-teal-600 {
    color: var(--teal-600) !important;
}

.text-teal-700 {
    color: var(--teal-700) !important;
}

.text-slate-500 {
    color: var(--slate-500) !important;
}

.text-cyan-600 {
    color: var(--cyan-600) !important;
}

.text-indigo-600 {
    color: var(--indigo-600) !important;
}

.bg-default {
    background-color: var(--white-bg);
}

.bg_login {
    width: 480px;
    background-color: var(--white-bg-rgba);
}

.bg_login input {
    background-color: var(--white-bg-rgba) !important;
}

@media (max-width: 576px) {
    .bg_login {
        width: 100%;
    }
}

* { 
    font-family: "Poppins", sans-serif;
    font-size: 0.875rem;
}
body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    transition: all 0.3s ease !important;
    background-color: var(--bg-clr) !important;
}


label::after {
    content: "";
    display: table;
    clear: both;
}

.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    z-index: 9999;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: #1d4ed8;
    border-radius: 50%;
    animation: spin 0.85s linear infinite;
}

.spinner-message {
    color: #fff;
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    margin: 0;
    text-align: center;
    opacity: 0.9;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Antes de que JS termine de cargar Main+User, mantengo todo oculto */
#main_content { 
    opacity: 1;
}

/* Clase que aplicaremos luego para mostrarlo */
#main_content.ready { 
    opacity: 1;
}

.page_header {
    background-color: var(--white-bg);
    border-radius: 20px;
    transition: all 1s ease;
}

.page_content {
    background-color: var(--white-bg);
    border-radius: 20px;
    transition: all 1s ease;
}

.page_container {
    flex: 1 1 auto;
    min-height: 0;
}

#page_content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/*Estilos para la tabla */
.table-container {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* scroll solo aquí */
    min-height: 0;
    /* Truco para superponer el scroll sin que ocupe espacio */

    scrollbar-gutter: stable; /* en navegadores modernos */
    position: relative;
}

.table-container::-webkit-scrollbar { 
    position: absolute;
    width: 8px;
    left: 0;
    top: 0;
}

.table-container::-webkit-scrollbar-track {
    background: transparent;
}
 
::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    border-radius: 5px;
    background-color: rgba(108, 79, 206, 0.5); 
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgba(108, 79, 206, 1);
}


table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

thead, tbody tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.thead_md thead {
    color: var(--dark-text-clr);
    border-bottom: 2px solid var(--primary-clr);
}

.thead_md thead th {
    padding: 10px 14px;
}

.tbody_md tbody tr {
    cursor: pointer;
    border-bottom: 1px solid var(--primary-clr);
    color: var(--dark-text-clr);
}

.tbody_md tbody tr td {
    padding: 10px 14px;
}

.tbody_md tbody tr:hover {
    background-color: var(--hover-clr);
}

tbody {
    display: block;
    overflow-y: auto;
}
/**/

.section_sidebar {
    width: 250px !important;
    border-radius: 2rem;
    background-color: var(--white-bg);
    overflow: hidden;
    transition: all 0.5s ease;
}

.section_sidebar {
    position: relative;
    display: flex;
    flex-direction: column;
}

.section_sidebar .navlogo {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
    border-radius: 5px;
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
}

.section_sidebar .navlogo .contracteclogo {
    display: block;
    position: absolute;
    left: -100%;
    transform: translateX(100px);
    transition: all 0.5s ease;
    white-space: nowrap;
    opacity: 0;
}

.section_sidebar .navlogo .expandedlogo {
    display: block; 
    position: absolute;
    transition: all 0.5s ease;
    white-space: nowrap;
}

.section_sidebar.contracted .navlogo .expandedlogo {
    opacity: 0;
    transform: translateX(-100px);
}

.section_sidebar.contracted .navlogo .contracteclogo {
    left: 50%;
    transform: translateX(-50%);
    opacity: 1;
}

.section_sidebar ul {
    padding: 0px;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(100vh - 160px);
}

.section_sidebar ul::-webkit-scrollbar {
    width: 4px;
}

.section_sidebar ul::-webkit-scrollbar-track {
    background: transparent;
}

.section_sidebar ul::-webkit-scrollbar-thumb {
    background-color: var(--hover-clr);
    border-radius: 4px;
}

.section_sidebar ul li { 
    display: flex;
    justify-content: center;
}

.section_sidebar ul li a {
    display: flex;
    border-radius: 5px;
    align-items: center;
    width: 100%;
    height: 41px;
    padding: 10px 0;
    text-decoration: none;
    white-space: nowrap;
    text-transform: capitalize;
    color: var(--dark-text-clr);
    transition: all 0.5s ease;
}

.section_sidebar ul li a span {
    transition: all 0.5s ease;
    transition-delay: calc(0.06s * var(--i));
    transform: translateX(0px);
    opacity: 1;
    z-index: 2;
}

.section_sidebar ul li a i {
    font-size: 20px;
    padding: 0 15px;
}

/* .section_sidebar ul li a span {
    margin-left: 15px;
} */

.section_sidebar ul li a:hover {
    border-radius: 10px;
    background-color: var(--hover-clr);
    width: calc(100% - 20px); /* 100% menos el padding total */ 
}

.section_sidebar ul li a.active {
    border-radius: 1rem;
    color: var(--white-always);
    background-color: var(--primary-clr);
    width: calc(100% - 20px); /* 100% menos el padding total */
    box-shadow: rgba(117, 34, 230, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
}

.section_sidebar ul li a.active span {
    color: var(--white-always) !important;
}

.section_sidebar ul li a.active i {
    color: var(--white-always) !important;
}

.section_sidebar.contracted {
    min-width: 70px !important;
    width: 70px !important;
}

.section_sidebar.contracted ul li a span {
    transform: translateX(-100px);
    opacity: 0;
    padding: 10px;
}

.section_sidebar.contracted:hover {
    overflow: visible;
}

.section_sidebar.contracted ul li a:hover {
    border-radius: 10px 0px 0px 10px;
}

.section_sidebar.contracted ul li a:hover span {
    position: absolute;
    left: 74px;

    border-radius: 0px 10px 10px 0px;


    color: var(--light-text-clr);
    background-color: var(--primary-clr);
    box-shadow: rgba(117, 34, 230, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
    animation: slideIn 0.1s ease-in-out forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(0px);
    }
    to {
        opacity: 1;
        transform: translateX(0px);
    }
}

.section_sidebar .button_md {
    position: absolute;
    top: 50%;
    right: 0%;
    transform: translate(100%, -50%);
    border-radius: 0px 10px 10px 0px;
    padding: 15px 0;
    opacity: 0.5; 
}

@media (max-width: 992px) {
    .container_sidebar {
        padding: 0 !important;
        margin: 0 !important;
    }
    .section_sidebar {
        background-color: var(--subwhite-bg);
        position: fixed;
        top: 50%;
        left: 0;
        transform: translate(-0%, -50%); 
        box-shadow: rgba(17, 17, 26, 0.1) 0px 1px 0px, rgba(17, 17, 26, 0.1) 0px 8px 24px, rgba(17, 17, 26, 0.1) 0px 16px 48px;
        z-index: 1;
        margin:15px 0px 0 15px;
    }
    .section_sidebar .button_md {
        position: absolute;
        top: 50%;
        right: 0%;
        transform: translate(100%, -50%); 
        /* border-radius: 0px 10px 10px 0px; */
        padding: 15px 0;
        opacity: 0.5; 
    }
    .section_sidebar .button_md:hover { 
        opacity: 1; 
    }
    .section_sidebar.contracted {
        top: 50%;
        left: -85px;
        transform: translate(-0%, -50%);
        height: auto;
    }
}

@media (max-width: 576px) {
    .container_sidebar {
        padding: 0 !important;
        margin: 0 !important;
    }
    .section_sidebar {
        position: fixed;
        top: 100%;
        left: 0;
        transform: translateY(-100%);
        margin: 0;
        height: auto;
        width: 100vw !important;
        border-radius: 2rem 2rem 0px 0px;
        box-shadow: rgba(17, 17, 26, 0.1) 0px 1px 0px, rgba(17, 17, 26, 0.1) 0px 8px 24px, rgba(17, 17, 26, 0.1) 0px 16px 48px;
        opacity: 1;
        /* border: 1px solid var(--primary-clr); */
    } 

    .section_sidebar.contracted {
        top: 100%;
        left: 0;
        transform: translateY(0%);
        width: 100vw !important;
        opacity: 0;
    }
}

/* Fin de section_sidebar */

.button_action_md {
    border-radius: 10px;
    background-color: var(--action-clr);
    color: var(--light-text-clr);
    border: none;
    cursor: pointer;
    padding: 10px;
    transition: all 0.2s ease;
}

.button_md {
    border-radius: 10px;
    background-color: var(--primary-clr);
    color: var(--white-always);
    border: none;
    cursor: pointer;
    padding: 10px;
    transition: all 0.2s ease;
}

.button_md:hover {
    background-color: var(--button-clr-hover);
}

.dropdown-menu {
    border: 1px solid #ceceea !important;
    background-color: var(--subwhite-bg) !important;
    box-shadow: 0 4px 6px 0 rgba(67, 46, 134, .08) !important;
}
.dropdown-menu .dropdown-item {
    color: var(--dark-text-clr) !important;
    border-radius: 1rem;
}

.dropdown-menu .dropdown-item:hover {
    background-color: var(--hover-clr) !important; 
}

.dropdown-menu .dropdown-item.active {
    background-color: var(--button-active-clr) !important;
    color: var(--light-text-clr) !important;
}

/* Estilo para la captura de documentos */
/* Contenedor de cámara pantalla completa */
#captureScreen {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background-color: black;
    z-index: 9999;
  }
  
  #video_view_s1 {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
  }
  
  #flashEffect_camera {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    opacity: 0.75;
    display: none;
    z-index: 5;
  }
  
  #statusMessage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    display: none;
    z-index: 10;
  }

  .containerbtncaptureScreen {
    height: 400px; /* o un alto fijo si quieres */
    position: absolute;
    top: 50%; /* centro vertical */
    right: env(safe-area-inset-right); /* respeta notch/lateral */
    transform: translateY(-50%); /* ajusta centro exacto */
    display: flex;
    flex-direction: column; /* botones en columna */
    align-items: center;
    justify-content: space-around;
    padding: 10px;
    /* border: 1px solid #ddd; */
}

@media (max-height: 400px) {
    .containerbtncaptureScreen {
        height: 100vh; /* o un alto fijo si quieres */
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-around;
        padding: 10px;
        /* border: 1px solid #ddd; */
    }
  }

  @media (max-width: 576px) {
  .containerbtncaptureScreen {
    /* pasar a barra inferior */
    top: auto;
    bottom: env(safe-area-inset-bottom);
    left: env(safe-area-inset-left);
    right: env(safe-area-inset-right);
    transform: none;

    /* fila horizontal */
    flex-direction: row;
    align-items: center;
    justify-content: space-around; /* o center + gap */

    /* tamaño y espaciado */
    height: auto;
    padding: 10px;
    gap: 10px;

    /* opcional: quitar borde si estorba */
    /* border: 0; */
  }

  /* táctil cómodo y que no se rompa el layout */
  .containerbtncaptureScreen > * {
    flex: 0 1 auto; /* quita si quieres que todos se expandan por igual */
  }
}

  #btnTakeCapture {
    width: 4.5rem;
    height: 4.5rem;
    color: rgb(255, 0, 0);
    background-color: rgba(0, 0, 0, 0.527);
    /* border: 1px solid #ddd; */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #btnTakeCapture i {
    color: rgb(255, 255, 255);
    font-size: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #btnTakeCapture i:hover {
    color: var(--primary-clr);
  }

  #btnCloseCapture {
    color: rgb(255, 0, 0);
    width: 4rem;
    height: 4rem;
    background-color: rgba(0, 0, 0, 0.527);
    /* border: 1px solid #ddd; */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #btnCloseCapture i {
    color: rgb(255, 255, 255);
    font-size: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #btnCloseCapture i:hover {
    color: var(--primary-clr);
  }

  #btnChangeCamera {
    color: rgb(255, 0, 0);
    width: 4rem;
    height: 4rem;
    background-color: rgba(0, 0, 0, 0.527);
    /* border: 1px solid #ddd; */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #btnChangeCamera i {
    color: rgb(255, 255, 255);
    font-size: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #btnChangeCamera i:hover {
    color: var(--primary-clr);
  }

  .canvas_view_s1 {
    display: none;
  }
  /*Fin de estilo para captura de documentos*/
  /* Sortable grid */
.sortable-preview { 
    padding: 1rem;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    background-color: var(--bg-secondary);
    transition: var(--transition-smooth);
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .sortable-preview:not(:empty) {
    border-style: solid;
    background-color: transparent;
  }

  .uploaded_images { 
    padding: 1rem;
    border: 2px dashed var(--primary-color);
    border-radius: var(--radius-lg);
    background-color: var(--bg-secondary);
    transition: var(--transition-smooth);
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .uploaded_images:not(:empty) {
    border-style: solid;
    background-color: transparent;
  }


  /* Image card styles */
.image-card {
    position: relative;
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: move;
    transition: var(--transition-smooth);
    background-color: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .image-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
  }
  
  .image-card img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    transition: var(--transition-smooth);
  }
  
  .image-card:hover img {
    transform: scale(1.02);
  }
  
  .image-card.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
  }

  /* Action buttons */
.delete-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    font-weight: bold;
    padding: 8px 10px;
    font-size: 14px;
    line-height: 1;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-md);
    z-index: 10;
  }
  
  .delete-btn:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: scale(1.1);
  }

  .order-label {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: linear-gradient(135deg, var(--secondary-color), var(--text-primary));
    color: white;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
  }
  
  .image-info {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: var(--bg-primary-opacity-80);
    backdrop-filter: blur(8px);
    color: var(--text-primary);
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    max-width: 70%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
  }

  /* Progress container */
#progressContainer {
    background-color: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
  }
  
  #progressContainer .card {
    background-color: transparent;
    border: none;
  }
  
  #progressContainer .card-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.25rem;
  }
  
  /* Progress container */
#progressContainer {
  background-color: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

#progressContainer .card {
  background-color: transparent;
  border: none;
}

#progressContainer .card-title {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.25rem;
}

/* Progress bar */
.progress {
  border-radius: var(--radius-lg);
  background-color: var(--bg-secondary);
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar {
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-lg);
  transition: width 0.3s ease;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.progress-bar.progress-bar-striped {
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.15) 75%,
    transparent 75%,
    transparent
  );
  background-size: 1rem 1rem;
}

.progress-bar.progress-bar-animated {
  animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
  0% {
    background-position: 1rem 0;
  }
  100% {
    background-position: 0 0;
  }
}

/* Progress text and details */
#progressText {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
}

#progressDetails {
  color: var(--text-secondary);
}

#progressDetails .text-muted {
  color: var(--text-secondary) !important;
}

#currentProcessing {
  color: var(--primary-color) !important;
  font-weight: 500;
  font-style: italic;
}

/* Sortable grid */
.sortable-preview {
  min-height: 200px;
  padding: 1rem;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  background-color: var(--bg-secondary);
  transition: var(--transition-smooth);
  display: flex;
  justify-content: center;
  align-items: center;
}

.sortable-preview:not(:empty) {
  border-style: solid;
  background-color: transparent;
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    margin: 1rem;
    padding: 1.5rem;
  }
  
  h2 {
    font-size: 1.5rem;
    text-align: center;
  }
  
  .image-card {
    margin-bottom: 1rem;
  }
}

/* Dark mode enhancements */
body.dark_mode .form-control {
  background-color: var(--bg-secondary);
  border-color: var(--border-color);
  color: var(--text-primary);
}

body.dark_mode .form-control:focus {
  background-color: var(--bg-primary);
  border-color: var(--primary-color);
}

body.dark_mode .image-info {
  background: var(--bg-primary-opacity-60);
  backdrop-filter: blur(8px);
  color: var(--text-primary);
}

/* Loading states */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.image-card {
  animation: fadeIn 0.3s ease-out;
}

/* Success states */
.completed-item {
  border-color: #10b981 !important;
  background-color: rgba(16, 185, 129, 0.05);
}

.completed-item::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  color: #10b981;
  font-weight: bold;
  opacity: 0.8;
  z-index: 5;
  pointer-events: none;
}

/* Badge color naranja (estado Devuelto) */
.bg-orange {
  background-color: #fd7e14 !important;
}
}