/* ======================================================
   GLOBAL.CSS
   TEMA BASE APPLE PRETO E BRANCO
====================================================== */

:root{
  color-scheme: light;

  /* fundo / superfícies */
  --color-bg-main: #f5f5f7;
  --color-bg-soft: #ededf0;
  --color-card: rgba(255,255,255,.82);

  --color-surface-1: rgba(255,255,255,.62);
  --color-surface-2: rgba(255,255,255,.78);
  --color-surface-3: rgba(245,245,247,.96);
  --color-surface-4: rgba(0,0,0,.03);

  /* textos */
  --color-text: #1d1d1f;
  --color-text-strong: #000000;
  --color-text-muted: #6e6e73;
  --color-text-head: #4a4a4f;

  /* bordas */
  --color-border: rgba(0,0,0,.08);
  --color-border-strong: rgba(0,0,0,.14);

  /* navbar */
  --color-nav-bg: rgba(255,255,255,.78);
  --color-nav-border: rgba(0,0,0,.08);

  /* auxiliares */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-soft: 0 10px 30px rgba(0,0,0,.08);
  --shadow-card: 0 12px 36px rgba(0,0,0,.10);

  --btn-dark-bg: #000000;
  --btn-dark-hover: #111111;

  --success: #34c759;
  --warning: #ffcc00;
  --danger: #ff3b30;
  --info: #007aff;
  --gray: #8e8e93;
}

/* ======================================================
   DARK MODE
====================================================== */

[data-theme="dark"]{
  color-scheme: dark;

  --color-bg-main: #0a0a0a;
  --color-bg-soft: #111111;
  --color-card: rgba(22,22,22,.82);

  --color-surface-1: rgba(255,255,255,.02);
  --color-surface-2: rgba(255,255,255,.04);
  --color-surface-3: rgba(255,255,255,.06);
  --color-surface-4: rgba(255,255,255,.08);

  --color-text: #f5f5f7;
  --color-text-strong: #ffffff;
  --color-text-muted: rgba(255,255,255,.56);
  --color-text-head: rgba(255,255,255,.76);

  --color-border: rgba(255,255,255,.08);
  --color-border-strong: rgba(255,255,255,.14);

  --color-nav-bg: rgba(10,10,10,.76);
  --color-nav-border: rgba(255,255,255,.08);

  --shadow-soft: 0 10px 30px rgba(0,0,0,.28);
  --shadow-card: 0 12px 40px rgba(0,0,0,.32);

  --btn-dark-bg: #ffffff;
  --btn-dark-hover: #f2f2f2;
}

/* ======================================================
   RESET / BASE
====================================================== */

*{
  box-sizing: border-box;
}

html,
body{
  height: 100%;
}

body{
  margin: 0;
  background: var(--color-bg-main);
  color: var(--color-text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.app-bg{
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(255,255,255,.06), transparent 34%),
    linear-gradient(180deg, var(--color-bg-main) 0%, var(--color-bg-soft) 100%);
}

[data-theme="dark"] .app-bg{
  background:
    radial-gradient(circle at top, rgba(255,255,255,.04), transparent 34%),
    linear-gradient(180deg, var(--color-bg-main) 0%, var(--color-bg-soft) 100%);
}

a{
  color: inherit;
  text-decoration: none;
}

img{
  max-width: 100%;
  display: block;
}

.hr-soft{
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 0;
}

/* ======================================================
   NAVBAR
====================================================== */

.app-nav{
  background: var(--color-nav-bg) !important;
  border-bottom: 1px solid var(--color-nav-border) !important;
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 1030;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav-shell{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.nav-left{
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
  flex: 1 1 auto;
}

.salao-logo{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  flex: 0 0 auto;
}

.nav-txt{
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.nav-salao-title{
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-user-sub{
  font-size: 12px;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* desktop */

.nav-desktop{
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1 1 auto;
  min-width: 0;
  gap: 16px;
}

.nav-desktop-modules{
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.nav-module-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: all .18s ease;
}

.nav-module-link:hover{
  background: var(--color-surface-2);
  color: var(--color-text-strong);
}

.nav-module-link.active{
  background: var(--color-surface-3);
  color: var(--color-text-strong);
  border: 1px solid var(--color-border);
}

.nav-desktop-actions{
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

/* ======================================================
   BOTÕES DA NAV
====================================================== */

.nav-btn{
  height: 36px;
  padding: 0 12px !important;
  border-radius: 10px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--color-border) !important;
  background: var(--color-surface-2) !important;
  color: var(--color-text) !important;
  font-size: 13px;
  font-weight: 600;
  box-shadow: none !important;
  white-space: nowrap;
  transition: all .18s ease;
}

.nav-btn:hover{
  background: var(--color-surface-3) !important;
  color: var(--color-text-strong) !important;
  transform: translateY(-1px);
}

.nav-btn i{
  font-size: 14px;
  line-height: 1;
}

.nav-btn-icon{
  width: 36px;
  min-width: 36px;
  padding: 0 !important;
}

.nav-btn-mobile-icon{
  width: 100%;
  min-width: 100%;
  justify-content: center;
}

/* ======================================================
   HAMBURGER
====================================================== */

.nav-hamburger{
  display: none !important;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 12px !important;
  border: 1px solid var(--color-border) !important;
  background: var(--color-surface-2) !important;
  color: var(--color-text) !important;
  box-shadow: none !important;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
}

.navbar-toggler:focus{
  box-shadow: none !important;
}

.navbar-toggler-icon{
  width: 18px;
  height: 18px;
}

/* ======================================================
   MOBILE MENU
====================================================== */

.nav-collapse-wrap{
  display: none;
  width: 100%;
}

.nav-mobile-area{
  margin-top: 12px;
  padding: 0 0 4px;
}

.nav-mobile-modules{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-mobile-link{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  text-decoration: none;
  color: var(--color-text);
  background: var(--color-surface-1);
  font-size: 14px;
  font-weight: 600;
  transition: all .18s ease;
}

.nav-mobile-link:hover{
  background: var(--color-surface-2);
  color: var(--color-text-strong);
}

.nav-mobile-link.active{
  background: var(--color-surface-3);
  color: var(--color-text-strong);
}

.nav-mobile-divider{
  height: 1px;
  background: var(--color-border);
  margin: 12px 0;
}

.nav-mobile-actions{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-mobile-action-btn{
  width: 100%;
  justify-content: flex-start;
  min-height: 44px;
}

/* ======================================================
   RESPONSIVE NAV
====================================================== */

@media (max-width: 991.98px){
  .nav-desktop{
    display: none !important;
  }

  .nav-hamburger{
    display: inline-flex !important;
  }

  .nav-collapse-wrap.show{
    display: block !important;
  }

  .nav-collapse-wrap.collapsing{
    display: block !important;
    overflow: hidden;
  }
}

@media (min-width: 992px){
  .nav-desktop{
    display: flex !important;
  }

  .nav-hamburger{
    display: none !important;
  }

  .nav-collapse-wrap,
  .nav-collapse-wrap.show,
  .nav-collapse-wrap.collapsing{
    display: none !important;
  }
}

@media (max-width: 768px){
  .app-nav{
    padding: 8px 0;
  }

  .salao-logo{
    width: 34px;
    height: 34px;
  }

  .nav-salao-title{
    font-size: 14px;
  }

  .nav-user-sub{
    font-size: 11px;
  }

  .nav-shell{
    gap: 10px;
  }

  .nav-left{
    flex: 1 1 auto;
    min-width: 0;
  }

  .nav-txt{
    min-width: 0;
  }
}

/* ======================================================
   CARDS
====================================================== */

.app-card{
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.app-card.soft{
  min-height: 120px;
}

.section-title{
  font-weight: 700;
  color: var(--color-text-strong);
}

.small-muted{
  color: var(--color-text-muted);
  font-size: 13px;
}

/* ======================================================
   BUTTONS
====================================================== */

.btn{
  border-radius: 12px;
}

.btn-dark{
  background: var(--btn-dark-bg);
  border-color: var(--btn-dark-bg);
  color: var(--accent-contrast, #ffffff);
}

.btn-dark:hover{
  background: var(--btn-dark-hover);
  border-color: var(--btn-dark-hover);
  color: var(--accent-contrast, #ffffff);
}

[data-theme="dark"] .btn-dark{
  color: #000000;
}

[data-theme="dark"] .btn-dark:hover{
  color: #000000;
}

/* ======================================================
   FORMS
====================================================== */

.form-control,
.form-select{
  background: var(--color-card);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  border-radius: 12px;
  box-shadow: none;
}

.form-control:focus,
.form-select:focus{
  box-shadow: 0 0 0 3px rgba(0,0,0,.04);
  border-color: rgba(0,0,0,.22);
  background: var(--color-card);
  color: var(--color-text);
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus{
  box-shadow: 0 0 0 3px rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.18);
}

.form-control::placeholder{
  color: #9a9a9a;
}

.form-select option{
  color: #111111;
  background: #ffffff;
}

[data-theme="dark"] .form-select option{
  color: #111111;
  background: #ffffff;
}

/* ======================================================
   TABLE
====================================================== */

.table{
  color: var(--color-text);
  background: transparent;
}

.table thead{
  background: transparent;
}

.table thead th{
  color: var(--color-text-head);
  border-bottom: 1px solid var(--color-border);
}

.table tbody td{
  border-top: 1px solid var(--color-border);
}

.table tbody tr:hover{
  background: var(--color-surface-2);
}

/* ======================================================
   STATUS
====================================================== */

.st-pill{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  color: var(--color-text);
}

.st-dot{
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.st-green{ background: var(--success); }
.st-yellow{ background: var(--warning); }
.st-red{ background: var(--danger); }
.st-blue{ background: var(--info); }
.st-gray{ background: var(--gray); }

/* ======================================================
   ACTION BUTTONS
====================================================== */

.btn-mini{
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  color: var(--color-text);
  transition: all .18s ease;
}

.btn-mini:hover{
  background: var(--color-surface-3);
  transform: translateY(-1px);
}

/* ======================================================
   EXTRA
====================================================== */

.upload-box{
  width: 84px;
  height: 84px;
  border-radius: var(--radius);
  border: 2px dashed var(--color-border);
  display: grid;
  place-items: center;
  background: var(--color-surface-2);
}