/* ============================================================
   ROYALTY VIAGENS — ROYALTY-UI.CSS
   Folha de estilo compartilhada do Portal Unificado.
   Uma só base visual para o portal, os apps e os sites.
   Identidade: Montserrat · turquesa/azul/laranja/vinho · Apple-like.
   Tema claro/escuro via [data-theme] no <html> ou <body>.
   ------------------------------------------------------------
   Inclua em qualquer página:
     <link rel="stylesheet" href="royalty-ui.css">
   (Os ícones usam Tabler Icons — inclua também:
     <link rel="stylesheet"
       href="https://cdn.jsdelivr.net/npm/@tabler/icons-webfont@3.7.0/dist/tabler-icons.min.css">)
   ============================================================ */

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

/* ===================== TOKENS ===================== */
:root{
  /* marca */
  --rv-turq:#058996;  --rv-turq-d:#04707a;
  --rv-azul:#10547A;  --rv-azul-d:#0a3450;
  --rv-lar:#FF852C;   --rv-lar-d:#d65f12;
  --rv-vin:#7a1f3d;

  /* superfícies (tema claro) */
  --rv-bg:#f4f7f8;
  --rv-surface:#ffffff;
  --rv-surface-2:#f6f9fa;
  --rv-surface-3:#eef3f5;
  --rv-line:#e6edf0;
  --rv-line-2:#d8e1e6;

  /* texto */
  --rv-text:#0b1a20;
  --rv-text-soft:#5f6b70;
  --rv-text-mut:#94a1a6;

  /* acentos turquesa translúcidos (chips, hovers) */
  --rv-turq-08:rgba(5,137,150,.08);
  --rv-turq-12:rgba(5,137,150,.12);
  --rv-turq-30:rgba(5,137,150,.30);
  --rv-turq-100:#e7f5f4;
  --rv-lar-12:rgba(255,133,44,.12);
  --rv-lar-35:rgba(255,133,44,.35);

  /* estados semânticos */
  --rv-ok:#1d9e75;   --rv-ok-bg:rgba(29,158,117,.12);
  --rv-warn:#e0901a; --rv-warn-bg:rgba(224,144,26,.14);
  --rv-err:#e24b4a;  --rv-err-bg:rgba(226,75,74,.12);

  /* raios, sombras, navegação */
  --rv-r-sm:9px; --rv-r-md:12px; --rv-r-lg:16px; --rv-r-pill:999px;
  --rv-shadow:0 1px 2px rgba(11,26,32,.04),0 10px 28px -14px rgba(11,26,32,.12);
  --rv-shadow-soft:0 1px 2px rgba(11,26,32,.05);
  --rv-shadow-lg:0 30px 70px -28px rgba(11,26,32,.26);
  --rv-nav-bg:rgba(255,255,255,.94);
  --rv-nav-line:#e6edf0;

  /* layout */
  --rv-side-w:264px;
  --rv-top-h:64px;
  --rv-pad:26px;

  --rv-sans:'Montserrat',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
}

[data-theme="dark"]{
  --rv-bg:#0b1418;
  --rv-surface:#0f2229;
  --rv-surface-2:#12282f;
  --rv-surface-3:#16313a;
  --rv-line:#1c333b;
  --rv-line-2:#244049;
  --rv-text:#eef3f4;
  --rv-text-soft:#9fb1b6;
  --rv-text-mut:#6f878d;
  --rv-turq-d:#16a7b4;
  --rv-turq-100:#0e2e33;
  --rv-shadow:0 1px 2px rgba(0,0,0,.4),0 18px 50px -16px rgba(0,0,0,.6);
  --rv-shadow-soft:0 1px 2px rgba(0,0,0,.35);
  --rv-shadow-lg:0 36px 80px -30px rgba(0,0,0,.7);
  --rv-nav-bg:rgba(13,28,34,.94);
  --rv-nav-line:#173039;
}

/* ===================== RESET ===================== */
*,*::before,*::after{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:var(--rv-sans);
  background:var(--rv-bg);
  color:var(--rv-text);
  font-size:14px;line-height:1.5;
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;
  -webkit-text-size-adjust:100%;
}
img{max-width:100%;display:block}
button,input,select,textarea{font-family:inherit;font-size:inherit;color:inherit}
a{color:var(--rv-azul);text-decoration:none}
[data-theme="dark"] a{color:#6fb4dd}
::selection{background:var(--rv-turq-30)}

/* ===================== APP SHELL ===================== */
.rv-app{display:flex;min-height:100vh;min-height:100dvh}

/* ---- Barra de topo ---- */
.rv-topbar{
  position:sticky;top:0;z-index:40;
  height:var(--rv-top-h);display:flex;align-items:center;gap:14px;
  padding:0 20px;
  background:var(--rv-nav-bg);
  -webkit-backdrop-filter:saturate(160%) blur(10px);
  backdrop-filter:saturate(160%) blur(10px);
  border-bottom:1px solid var(--rv-nav-line);
}
.rv-brand{display:flex;align-items:center;gap:10px;flex:0 0 auto}
.rv-brand img{height:30px;width:auto}
.rv-brand .wm{font-weight:800;font-size:15px;line-height:1.05;letter-spacing:.3px;color:var(--rv-azul)}
[data-theme="dark"] .rv-brand .wm{color:#eaf2f3}
.rv-brand .wm small{display:block;font-size:10px;color:var(--rv-text-mut);font-weight:700;letter-spacing:.16em;text-transform:uppercase;margin-top:1px}
.rv-top-search{
  flex:1;min-width:0;max-width:560px;display:flex;align-items:center;gap:9px;
  background:var(--rv-bg);border:1px solid var(--rv-line);
  border-radius:var(--rv-r-md);padding:0 14px;height:42px;color:var(--rv-text-mut);
  transition:border-color .12s ease,box-shadow .12s ease,background .12s ease;
}
.rv-top-search:focus-within{border-color:var(--rv-turq-30);background:var(--rv-surface);box-shadow:0 0 0 4px var(--rv-turq-100)}
.rv-top-search i{font-size:18px}
.rv-top-search input{flex:1;min-width:0;border:none;background:none;outline:none;font-size:13px;color:var(--rv-text)}
.rv-top-search input::placeholder{color:var(--rv-text-mut);text-transform:uppercase;letter-spacing:.04em;font-size:12px;font-weight:600}
.rv-spacer{flex:1}

/* ---- Barra lateral ---- */
.rv-side{
  width:var(--rv-side-w);flex:0 0 auto;
  background:var(--rv-surface);border-right:1px solid var(--rv-line);
  padding:8px 10px;display:flex;flex-direction:column;gap:0;
  position:sticky;top:0;height:100vh;height:100dvh;overflow-y:auto;
}
.rv-side-h{display:flex;align-items:center;justify-content:center;padding:2px 6px 6px}
.rv-side-h img{width:100%;max-width:138px;height:auto;display:block}
.rv-nav{
  display:flex;align-items:center;gap:9px;width:100%;text-align:left;
  padding:5px 11px;border-radius:var(--rv-r-md);border:none;background:transparent;
  color:var(--rv-text-soft);font-size:12px;font-weight:600;cursor:pointer;line-height:1.1;
  position:relative;transition:background .12s ease,color .12s ease;
}
.rv-nav i{font-size:16.5px;width:18px;flex:0 0 auto;text-align:center;color:var(--rv-text-mut);transition:color .12s ease}
.rv-nav .rv-nav-n{flex:0 0 auto;width:18px;text-align:center;font-size:11px;font-weight:800;color:var(--rv-text-mut)}
.rv-nav>span:last-child{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rv-nav:hover{background:var(--rv-bg);color:var(--rv-text)}
.rv-nav:hover i{color:var(--rv-turq)}
.rv-nav.is-active{background:var(--rv-turq-100);color:var(--rv-turq-d)}
.rv-nav.is-active i,.rv-nav.is-active .rv-nav-n{color:var(--rv-turq)}
.rv-nav.is-active::before{content:"";position:absolute;left:-10px;top:5px;bottom:5px;width:3px;border-radius:0 4px 4px 0;background:var(--rv-turq)}
.rv-side-ft{margin-top:auto;padding:6px 8px 2px;border-top:1px solid var(--rv-line-2);font-size:10px;color:var(--rv-text-mut);line-height:1.4}
.rv-side-ft b{color:var(--rv-turq)}
.rv-subtabs{display:flex;gap:6px;margin:0 0 16px;flex-wrap:wrap}
.rv-subtab{display:inline-flex;align-items:center;gap:7px;padding:8px 16px;border-radius:99px;border:1px solid var(--rv-line);background:var(--rv-surface);color:var(--rv-text-soft);font-size:13px;font-weight:700;text-decoration:none;cursor:pointer;transition:all .12s ease}
.rv-subtab:hover{background:var(--rv-bg);color:var(--rv-text)}
.rv-subtab.is-active{background:var(--rv-turq-100);border-color:transparent;color:var(--rv-turq-d)}

/* ---- Conteúdo ---- */
.rv-main{flex:1;min-width:0;display:flex;flex-direction:column}
.rv-content{flex:1;padding:var(--rv-pad);max-width:1240px;width:100%;margin:0 auto}
.rv-crumb{font-size:12.5px;color:var(--rv-text-mut);font-weight:600;margin:0 0 6px}
.rv-crumb b{color:var(--rv-text-soft)}
.rv-page-h{display:flex;align-items:center;gap:13px;flex-wrap:wrap;margin:0 0 20px}
.rv-page-h h1{margin:0;font-size:29px;font-weight:800;letter-spacing:-.6px;color:var(--rv-text)}
.rv-page-h h1 em{font-style:normal;color:var(--rv-turq)}
.rv-page-h .rv-actions{margin-left:auto;display:flex;gap:9px;flex-wrap:wrap}

/* ===================== ÍCONES / AVATAR ===================== */
.rv-icbtn{
  width:42px;height:42px;flex:0 0 auto;border-radius:var(--rv-r-md);
  border:1px solid var(--rv-line);background:var(--rv-surface);color:var(--rv-text-soft);
  display:inline-flex;align-items:center;justify-content:center;font-size:19px;cursor:pointer;
  transition:background .12s ease,color .12s ease,border-color .12s ease;
}
.rv-icbtn:hover{background:var(--rv-turq-100);color:var(--rv-turq);border-color:var(--rv-turq-30)}
.rv-avatar{
  width:30px;height:30px;flex:0 0 auto;border-radius:50%;background:var(--rv-vin);color:#fff;
  display:inline-flex;align-items:center;justify-content:center;font-weight:600;font-size:11px;
}
.rv-userchip{display:flex;align-items:center;gap:8px;flex:0 0 auto;cursor:pointer}
.rv-userchip .nm{font-size:12px;font-weight:600;line-height:1.1}
.rv-userchip .lvl{font-size:10px;font-weight:600;color:var(--rv-turq-d)}

/* ===================== BOTÕES ===================== */
.rv-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  border-radius:var(--rv-r-md);border:1px solid var(--rv-line);background:var(--rv-surface);
  color:var(--rv-text);font-size:13.5px;font-weight:700;padding:11px 17px;cursor:pointer;
  transition:background .12s ease,border-color .12s ease,transform .05s ease,box-shadow .12s ease;white-space:nowrap;
}
.rv-btn i{font-size:18px}
.rv-btn:hover{background:var(--rv-turq-100);border-color:var(--rv-turq-30);color:var(--rv-turq-d)}
.rv-btn:active{transform:scale(.98)}
.rv-btn--primary{background:var(--rv-turq);border-color:var(--rv-turq);color:#fff;box-shadow:0 6px 16px -6px var(--rv-turq)}
.rv-btn--primary:hover{background:var(--rv-turq-d);border-color:var(--rv-turq-d);color:#fff}
.rv-btn--azul{background:var(--rv-azul);border-color:var(--rv-azul);color:#fff}
.rv-btn--azul:hover{background:var(--rv-azul-d);border-color:var(--rv-azul-d);color:#fff}
.rv-btn--laranja{background:var(--rv-lar);border-color:var(--rv-lar);color:#fff;box-shadow:0 6px 16px -6px var(--rv-lar)}
.rv-btn--laranja:hover{background:var(--rv-lar-d);border-color:var(--rv-lar-d);color:#fff}
.rv-btn--ghost{background:transparent;border-color:transparent;color:var(--rv-turq-d)}
.rv-btn--ghost:hover{background:var(--rv-turq-08);color:var(--rv-turq-d)}
.rv-btn--sm{padding:7px 12px;font-size:12.5px;border-radius:var(--rv-r-sm)}
.rv-btn--block{width:100%}

/* ===================== CHIPS / BADGES / STATUS ===================== */
.rv-code{
  font-size:12px;font-weight:700;letter-spacing:.3px;color:var(--rv-turq-d);
  background:var(--rv-turq-12);border:.5px solid var(--rv-turq-30);
  padding:3px 10px;border-radius:var(--rv-r-sm);
}
.rv-status{
  display:inline-flex;align-items:center;gap:6px;font-size:11.5px;font-weight:600;
  padding:4px 11px;border-radius:var(--rv-r-pill);
}
.rv-status::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.9}
.rv-status--reserva{color:var(--rv-lar);background:var(--rv-lar-12)}
.rv-status--pendente{color:var(--rv-warn);background:var(--rv-warn-bg)}
.rv-status--confirmada{color:var(--rv-ok);background:var(--rv-ok-bg)}
.rv-status--neutra{color:var(--rv-turq-d);background:var(--rv-turq-12)}
.rv-tag{
  display:inline-flex;align-items:center;gap:5px;font-size:10.5px;font-weight:600;
  color:var(--rv-text-soft);background:var(--rv-surface-2);border:.5px solid var(--rv-line);
  padding:3px 9px;border-radius:var(--rv-r-sm);
}

/* ===================== CARDS ===================== */
.rv-card{
  background:var(--rv-surface);border:1px solid var(--rv-line);
  border-radius:var(--rv-r-lg);padding:18px 18px;box-shadow:var(--rv-shadow-soft);
}
.rv-card--pad-lg{padding:22px}
.rv-card-h{display:flex;align-items:center;gap:9px;margin:0 0 14px;font-size:13.5px;font-weight:700}
.rv-card-h i{font-size:19px;color:var(--rv-turq)}
.rv-card-h .rv-actions{margin-left:auto}

/* métrica */
.rv-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:11px}
.rv-metric{background:var(--rv-surface-2);border-radius:var(--rv-r-md);padding:13px 14px}
.rv-metric label{display:block;font-size:11px;color:var(--rv-text-mut);font-weight:500;margin:0 0 4px}
.rv-metric b{font-size:22px;font-weight:700;letter-spacing:-.4px}
.rv-metric b small{font-size:12px;font-weight:600;color:var(--rv-text-soft)}

/* grid utilitário */
.rv-grid{display:grid;gap:14px}
.rv-grid--2{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
.rv-grid--3{grid-template-columns:repeat(auto-fit,minmax(230px,1fr))}

/* ===================== TABS (rolável no mobile) ===================== */
.rv-tabs{
  display:flex;gap:5px;overflow-x:auto;scrollbar-width:thin;
  -webkit-overflow-scrolling:touch;padding-bottom:2px;
}
.rv-tabs::-webkit-scrollbar{height:4px}
.rv-tabs::-webkit-scrollbar-thumb{background:var(--rv-line-2);border-radius:4px}
.rv-tab{
  flex:0 0 auto;display:inline-flex;align-items:center;gap:6px;white-space:nowrap;
  font-size:12.5px;font-weight:500;color:var(--rv-text-soft);
  background:var(--rv-surface-2);border:.5px solid var(--rv-line);
  padding:7px 13px;border-radius:var(--rv-r-sm);cursor:pointer;
}
.rv-tab i{font-size:15px}
.rv-tab.is-active{background:var(--rv-turq);color:#fff;border-color:var(--rv-turq)}
/* variante "sublinhado" para abas internas */
.rv-tabs--underline{gap:2px;border-bottom:.5px solid var(--rv-line)}
.rv-tabs--underline .rv-tab{background:none;border:none;border-bottom:2px solid transparent;border-radius:0;margin-bottom:-.5px}
.rv-tabs--underline .rv-tab.is-active{background:none;color:var(--rv-turq-d);border-bottom-color:var(--rv-turq);font-weight:600}

/* ===================== SEGMENTED ===================== */
.rv-seg{display:inline-flex;background:var(--rv-surface-2);border:.5px solid var(--rv-line);border-radius:var(--rv-r-sm);padding:3px;gap:3px}
.rv-seg button{border:none;background:none;color:var(--rv-text-soft);font-size:12px;font-weight:600;padding:6px 13px;border-radius:6px;cursor:pointer;display:inline-flex;align-items:center;gap:6px}
.rv-seg button.is-active{background:var(--rv-turq);color:#fff}

/* ===================== FORM ===================== */
.rv-field{display:block;margin-bottom:14px}
.rv-field label{display:block;font-size:12px;color:var(--rv-text-soft);font-weight:700;margin:0 0 6px;letter-spacing:.01em}
.rv-input,.rv-select,.rv-textarea{
  width:100%;background:var(--rv-surface);border:1px solid var(--rv-line);
  border-radius:var(--rv-r-md);padding:12px 13px;font-size:13.5px;font-weight:500;color:var(--rv-text);
  outline:none;transition:border-color .12s ease,box-shadow .12s ease,background .12s ease;
}
[data-theme="dark"] .rv-input,[data-theme="dark"] .rv-select,[data-theme="dark"] .rv-textarea{background:var(--rv-surface-2)}
.rv-input::placeholder,.rv-textarea::placeholder{color:var(--rv-text-mut);font-weight:500}
.rv-input:hover,.rv-select:hover,.rv-textarea:hover{border-color:var(--rv-line-2)}
.rv-input:focus,.rv-select:focus,.rv-textarea:focus{border-color:var(--rv-turq);box-shadow:0 0 0 4px var(--rv-turq-100)}
.rv-textarea{min-height:88px;resize:vertical;line-height:1.5}
.rv-select{appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235f6b70' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 11px center;padding-right:38px}
.rv-row{display:grid;gap:14px;grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}

/* ===================== TABELA ===================== */
.rv-table{width:100%;border-collapse:collapse;font-size:13px}
.rv-table th{
  text-align:left;font-size:10.5px;font-weight:600;color:var(--rv-text-mut);
  text-transform:uppercase;letter-spacing:.4px;padding:0 8px 9px;border-bottom:.5px solid var(--rv-line);
}
.rv-table td{padding:11px 8px;border-bottom:.5px solid var(--rv-line);font-weight:500}
.rv-table tr:last-child td{border-bottom:none}
.rv-table .num{text-align:right;font-variant-numeric:tabular-nums}

/* ===================== EMPTY / FASE ===================== */
.rv-empty{
  text-align:center;padding:48px 22px;color:var(--rv-text-soft);
  border:1.5px dashed var(--rv-line-2);border-radius:var(--rv-r-lg);background:var(--rv-surface-2);
}
.rv-empty i{font-size:30px;color:var(--rv-turq);width:64px;height:64px;border-radius:18px;background:var(--rv-turq-100);display:inline-flex;align-items:center;justify-content:center}
.rv-empty h3{margin:16px 0 6px;font-size:18px;font-weight:800;color:var(--rv-text)}
.rv-empty p{margin:0 auto;max-width:460px;font-size:13.5px;line-height:1.55}
.rv-empty p b{color:var(--rv-turq-d)}
.rv-fase-pill{display:inline-block;margin-top:14px;font-size:11px;font-weight:700;letter-spacing:.4px;color:var(--rv-azul);background:rgba(16,84,122,.1);padding:5px 12px;border-radius:var(--rv-r-pill)}
[data-theme="dark"] .rv-fase-pill{color:#6fb4dd;background:rgba(111,180,221,.12)}

/* lista de módulos dentro de uma área */
.rv-modlist{display:grid;gap:9px;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));margin-top:4px}
.rv-mod{display:flex;align-items:flex-start;gap:10px;background:var(--rv-surface);border:.5px solid var(--rv-line);border-radius:var(--rv-r-md);padding:12px 13px}
.rv-mod i{font-size:19px;color:var(--rv-turq);flex:0 0 auto;margin-top:1px}
.rv-mod .nm{font-size:13px;font-weight:600;line-height:1.25}
.rv-mod .ds{font-size:11.5px;color:var(--rv-text-mut);margin-top:2px;line-height:1.4}
.rv-mod--ok i{color:var(--rv-ok)}

/* ===================== DRAWER / OVERLAY (mobile) ===================== */
.rv-scrim{position:fixed;inset:0;background:rgba(8,16,20,.5);z-index:49;opacity:0;visibility:hidden;transition:opacity .2s ease}
.rv-scrim.is-open{opacity:1;visibility:visible}

/* barra inferior (mobile) */
.rv-bottomnav{display:none}

/* ===================== RESPONSIVO ===================== */
@media (max-width:920px){
  :root{--rv-side-w:208px}
}
@media (max-width:760px){
  .rv-side{
    position:fixed;left:0;top:0;bottom:0;z-index:50;height:100dvh;
    transform:translateX(-100%);transition:transform .22s ease;box-shadow:var(--rv-shadow-lg);
    width:262px;
  }
  .rv-side.is-open{transform:translateX(0)}
  .rv-top-search{display:none}
  .rv-content{padding:14px 13px 84px}
  .rv-page-h h1{font-size:18px}
  .rv-show-mobile{display:inline-flex !important}
  .rv-hide-mobile{display:none !important}

  /* barra inferior fixa com as áreas principais */
  .rv-bottomnav{
    display:flex;position:fixed;left:0;right:0;bottom:0;z-index:45;
    background:var(--rv-nav-bg);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);
    border-top:.5px solid var(--rv-nav-line);padding:6px 4px;
    padding-bottom:calc(6px + env(safe-area-inset-bottom,0px));
  }
  .rv-bn{
    flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;
    background:none;border:none;color:var(--rv-text-mut);font-size:9.5px;font-weight:600;cursor:pointer;padding:4px 2px;
  }
  .rv-bn i{font-size:21px}
  .rv-bn.is-active{color:var(--rv-turq-d)}
}
@media (min-width:761px){
  .rv-show-mobile{display:none !important}
  .rv-menu-btn{display:none}
}

/* utilidades */
.rv-mt{margin-top:14px}.rv-mt-lg{margin-top:22px}
.rv-muted{color:var(--rv-text-mut)}
.rv-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

/* padrão maiúsculo: campos de texto exibem em MAIÚSCULAS (e-mail e senha ficam de fora) */
input[type="text"], input[type="search"], input:not([type]), textarea, .rv-input:not([type="email"]):not([type="password"]):not([type="tel"]):not([type="number"]):not([type="date"]){ text-transform:uppercase; }
input.rv-no-upper, textarea.rv-no-upper, input[data-noupper]{ text-transform:none; }
