:root{
    --bg: #f3f5f7;
    --card: #ffffff;
    --text: #2c3e50;
    --muted: #7b8a97;
  
    --sidebar: #1f3b4d;
    --sidebar-2: #183242;
    --accent: #16b6a1; /* verde/menta botones */
    --accent-2: #1cc7b1;
  
    --line: #e6eaee;
    --shadow: 0 10px 30px rgba(0,0,0,.06);
    --radius: 6px;
    --radius2: 10px;
  }
  
  *{ box-sizing: border-box; }
  html,body{ height:100%; }
  body{
    margin:0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color:var(--text);
    background: var(--bg);
  }
  
  a{ color:inherit; text-decoration:none; }
  
  .sr-only{
    position:absolute !important;
    width:1px; height:1px;
    padding:0; margin:-1px;
    overflow:hidden; clip:rect(0,0,0,0);
    white-space:nowrap; border:0;
  }
  
  /* ---------- LOGIN ---------- */
  /*.page-login{
    background:#fff;
  }*/
  .login-title{
    margin-bottom: 16px;
  }
  
  .login-title h1{
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
  }
  
  .login-title p{
    margin: 6px 0 0;
    font-size: 13px;
    color: #2c3e50;
    opacity: 0.75;
  }
  .page-login{
    min-height: 100vh;
    margin: 0;
    background: url("../img/login-bg.png") no-repeat center center;
    background-size: contain ;
    display: flex;
    flex-direction: column;
  }
  .page-login::before{
    content:"";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35); /* oscurece ligeramente */
    z-index: 0;
  }
  
  .login-wrap,
  .login-header{
    position: relative;
    z-index: 1;
  }
  .login-header{
    padding:18px 22px;
  }
  .brand-logo{
    height:54px;
    width:auto;
  }
  .login-wrap{
    min-height: calc(100vh - 90px);
    display:flex;
    align-items:center;
    justify-content:center;
    padding: 20px;
  }
  .login-card{
    width: 440px;
    max-width: 92vw;
    text-align:center;
    padding: 28px 28px 22px;
    border:1px solid var(--line);
    border-radius: var(--radius2);
    box-shadow: var(--shadow);
  }
  /* .login-avatar{
    width: 140px;
    height: 140px;
    margin: 10px auto 18px;
    border-radius: 50%;
    background:
      radial-gradient(circle at 50% 38%, #fff 0 26px, transparent 27px),
      radial-gradient(circle at 50% 72%, #fff 0 36px, transparent 37px),
      #3f3f3f;
    opacity:.9;
  } */
  .form{
    display:flex;
    flex-direction:column;
    gap: 14px;
  }
  input{
    height: 40px;
    border:1px solid #d7dee6;
    border-radius: 4px;
    padding: 0 12px;
    outline:none;
    background:#fff;
  }
  input:focus{
    border-color: rgba(22,182,161,.6);
    box-shadow: 0 0 0 4px rgba(22,182,161,.12);
  }
  .login-help{
    margin: 6px 0 0;
    font-size: 13px;
  }
  .link-muted{ color:var(--muted); }
  
  /* ---------- DASHBOARD LAYOUT ---------- */
  .page-dashboard{
    display:flex;
    height:100vh;
    overflow:hidden;
  }
  
  .sidebar{
    width: 270px;
    background: var(--sidebar);
    color:#fff;
    display:flex;
    flex-direction:column;
  }
  .sidebar-top{
    padding: 18px 18px 10px;
  }
  .sidebar-title{
    margin:0;
    font-weight: 600;
    font-size: 20px;
  }
  .sidebar-user{
    display:flex;
    gap: 12px;
    align-items:center;
    padding: 16px 18px 18px;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .sidebar-user-avatar{
    width:54px;
    height:54px;
    border-radius:50%;
    background: rgba(255,255,255,.12);
    border: 2px solid rgba(255,255,255,.18);
    position:relative;
  }
  .sidebar-user-avatar::after{
    content:"";
    position:absolute;
    inset:0;
    margin:auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.8);
    top: 10px;
  }
  .sidebar-user-avatar::before{
    content:"";
    position:absolute;
    width: 34px;
    height: 18px;
    left: 10px;
    top: 30px;
    border: 2px solid rgba(255,255,255,.8);
    border-top:none;
    border-radius: 0 0 999px 999px;
  }
  .sidebar-user-hello{
    font-size: 12px;
    opacity:.85;
  }
  .sidebar-user-name{
    font-size: 13px;
    font-weight: 600;
    margin-top: 2px;
    max-width: 150px;
    white-space: normal;
    overflow:visible;
    text-overflow:unset;
    word-break: break-word;
    line-height: 1.2;
  }
  
  .sidebar-nav{
    padding: 14px 0;
  }
  .sidebar-nav-label{
    padding: 0 18px 10px;
    font-size: 12px;
    opacity:.75;
    letter-spacing:.08em;
  }
  .nav-item{
    display:flex;
    align-items:center;
    gap: 10px;
    padding: 12px 18px;
    color:#fff;
    opacity:.92;
    border-left: 4px solid transparent;
  }
  .nav-item:hover{ background: rgba(255,255,255,.06); }
  .nav-item-active{
    background: rgba(255,255,255,.06);
    border-left-color: var(--accent);
  }
  .nav-check{
    width: 18px;
    display:inline-flex;
    justify-content:center;
    opacity:.85;
  }
  
  /* Main app container */
  .app{
    flex:1;
    display:flex;
    flex-direction:column;
    min-width:0;
  }
  
  .topbar{
    height: 56px;
    background: #fff;
    border-bottom:1px solid var(--line);
    display:flex;
    align-items:center;
    padding: 0 14px;
    gap: 10px;
  }
  .topbar-spacer{ flex:1; }
  
  .icon-btn{
    border:0;
    background:transparent;
    cursor:pointer;
    padding: 8px;
    border-radius: 8px;
  }
  .icon-btn:hover{ background: rgba(0,0,0,.05); }
  
  .hamburger{
    display:inline-block;
    width: 20px;
    height: 14px;
    position:relative;
  }
  .hamburger::before,
  .hamburger::after{
    content:"";
    position:absolute;
    left:0; right:0;
    height:2px;
    background:#56616b;
    border-radius:999px;
  }
  .hamburger::before{ top:2px; box-shadow: 0 5px 0 #56616b, 0 10px 0 #56616b; }
  
  .topbar-user{
    position:relative;
    display:flex;
    align-items:center;
    gap: 8px;
  }
  .topbar-user-icon{
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0,0,0,.18);
  }
  .topbar-user-btn{
    border:1px solid var(--line);
    background:#fff;
    padding: 7px 10px;
    border-radius: 6px;
    cursor:pointer;
  }
  .caret{ opacity:.6; margin-left:6px; }
  
  .dropdown{
    display:none;
    position:absolute;
    right:0;
    top: 42px;
    background:#fff;
    border:1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow:hidden;
    min-width: 180px;
    z-index: 20;
  }
  .dropdown a{
    display:block;
    padding: 10px 12px;
    font-size: 14px;
  }
  .dropdown a:hover{ background: rgba(0,0,0,.04); }
  .topbar-user.open .dropdown{ display:block; }
  
  .content{
    padding: 18px;
    overflow:auto;
  }
  
  .card{
    background: var(--card);
    border:1px solid var(--line);
    border-radius: var(--radius2);
    box-shadow: var(--shadow);
    padding: 14px;
  }
  .card-header{
    display:flex;
    align-items:center;
    gap: 14px;
    padding: 8px 6px 14px;
    border-bottom: 1px solid var(--line);
  }
  .page-title{
    font-size: 38px;
    font-weight: 300;
    margin: 0;
    color:#6e8798;
  }
  .search{
    margin-left:auto;
    display:flex;
    align-items:center;
    gap: 8px;
    border:1px solid var(--line);
    border-radius: 8px;
    padding: 6px 10px;
    min-width: 260px;
  }
  .search input{
    border:0;
    height: 28px;
    padding:0;
  }
  .search input:focus{ box-shadow:none; }
  .search-icon{ opacity:.6; }
  
  .table-wrap{ overflow:auto; padding-top: 10px; }
  .table{
    width: 100%;
    border-collapse: collapse;
    min-width: 860px; /* para parecerse al layout de la captura */
  }
  .table thead th{
    text-align:left;
    font-size: 13px;
    font-weight: 600;
    color:#6b7c8a;
    padding: 10px 10px;
    border-bottom:1px solid var(--line);
  }
  .table .filters th{
    padding: 8px 10px 10px;
  }
  .table .filters input{
    width: 100%;
    height: 30px;
    border-radius: 6px;
    border:1px solid #e1e7ee;
    padding: 0 8px;
    font-size: 13px;
  }
  .table tbody td{
    padding: 12px 10px;
    border-bottom:1px solid #f0f3f6;
    font-size: 14px;
  }
  .th-center, .td-center{ text-align:center; }
  
  /* .ref-pill{
    display:inline-block;
    padding: 6px 10px;
    border-radius: 8px;
    background: #111;
    color:#111; 
    min-width: 120px;
  } */
  /* .ref-pill::after{
    content:"";
    display:block;
    height: 0;
  }
   */
  /* Buttons */
  .btn{
    border:1px solid transparent;
    border-radius: 6px;
    cursor:pointer;
    font-weight:600;
  }
  .btn-primary{
    height: 42px;
    background: var(--accent);
    color:#fff;
  }
  .btn-primary:hover{ background: var(--accent-2); }
  
  .btn-green{
    background: var(--accent);
    color:#fff;
  }
  .btn-green:hover{ background: var(--accent-2); }
  
  .btn-square{
    width: 38px;
    height: 38px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
  }
  
  /* ---------- MODAL ---------- */
  .modal{
    position:fixed;
    inset:0;
    display:none;
    z-index: 50;
  }
  .modal.show{ display:block; }
  .modal-backdrop{
    position:absolute;
    inset:0;
    background: rgba(0,0,0,.35);
  }
  .modal-panel{
    position:relative;
    width: min(620px, 92vw);
    margin: 80px auto;
    background:#fff;
    border-radius: 14px;
    box-shadow: var(--shadow);
    overflow:hidden;
  }
  .modal-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding: 14px 16px;
    border-bottom:1px solid var(--line);
  }
  .modal-body{
    padding: 16px;
  }
  
  /* ---------- RESPONSIVE ---------- */
  @media (max-width: 920px){
    .sidebar{
      position:fixed;
      z-index: 60;
      height:100vh;
      transform: translateX(0);
      transition: transform .2s ease;
    }
    body.sidebar-collapsed .sidebar{
      transform: translateX(-100%);
    }
    .app{ margin-left: 270px; }
    body.sidebar-collapsed .app{ margin-left: 0; }
  }
  
  @media (min-width: 921px){
    body.sidebar-collapsed .sidebar{ width: 74px; }
    body.sidebar-collapsed .sidebar .sidebar-title,
    body.sidebar-collapsed .sidebar .sidebar-user-meta,
    body.sidebar-collapsed .sidebar .sidebar-nav-label,
    body.sidebar-collapsed .sidebar .nav-item span:last-child{
      display:none;
    }
    body.sidebar-collapsed .app{ }
  }