/* ================================================================
   SALOM PORTAL - app.css
   Estilos do sistema de gestão (complementa styles.css)
================================================================ */

/* ---- Reset e base da app ---- */
.app-body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-dark, #0a0e27);
  color: var(--text-primary, #fff);
  height: 100vh;
  overflow: hidden;
}

/* ================================================================
   TELA DE LOGIN
================================================================ */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  padding: 20px;
}

.login-card {
  background: rgba(19, 24, 41, 0.95);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 42px 38px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  backdrop-filter: blur(10px);
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
}

.login-brand {
  font-size: 28px;
  font-weight: 900;
  background: linear-gradient(135deg, #00ff88, #00d9ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 3px;
}

.login-title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 6px;
}

.login-subtitle {
  color: #b0b8d4;
  text-align: center;
  font-size: 14px;
  margin: 0 0 28px;
}

.input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-wrap > i {
  position: absolute;
  left: 14px;
  color: #b0b8d4;
  font-size: 14px;
  pointer-events: none;
}

.input-icon-wrap input {
  width: 100%;
  padding: 12px 44px 12px 40px !important;
  box-sizing: border-box;
}

.toggle-pwd {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: #b0b8d4;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}

.toggle-pwd:hover { color: var(--primary-color, #00ff88); }

.login-error {
  color: #e2445c;
  font-size: 13px;
  min-height: 18px;
  margin-bottom: 8px;
  text-align: center;
}

.back-to-site {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #b0b8d4;
  text-decoration: none;
  font-size: 13px;
  margin-top: 20px;
  transition: color 0.2s;
}

.back-to-site:hover { color: var(--primary-color, #00ff88); }

/* ================================================================
   FORMULÁRIOS
================================================================ */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #b0b8d4;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary-color, #00ff88);
  box-shadow: 0 0 0 3px rgba(0,255,136,0.12);
}

.form-group select option { background: #131829; }

.form-group textarea { resize: vertical; min-height: 80px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-flex-2 { grid-column: span 2; }

.input-readonly {
  opacity: 0.6;
  cursor: default !important;
}

.form-hint {
  font-size: 12px;
  color: #6b7280;
  margin-top: 8px;
}

/* ================================================================
   APP LAYOUT
================================================================ */
.app-screen {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ================================================================
   SIDEBAR
================================================================ */
.sidebar {
  width: 240px;
  min-width: 240px;
  background: #0d1126;
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  transition: width 0.25s ease, min-width 0.25s ease;
  overflow: hidden;
  position: relative;
  z-index: 100;
}

.sidebar.collapsed {
  width: 64px;
  min-width: 64px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  min-height: 64px;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.sidebar-brand {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #00ff88, #00d9ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.sidebar.collapsed .sidebar-brand,
.sidebar.collapsed .sidebar-name,
.sidebar.collapsed .sidebar-role,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-item span:not(.nav-badge),
.sidebar.collapsed .nav-label { display: none; }

.sidebar-collapse-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  color: #b0b8d4;
  cursor: pointer;
  padding: 6px 8px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.sidebar-collapse-btn:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.sidebar.collapsed .sidebar-collapse-btn { margin: 0 auto; }

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.nav-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #6b7280;
  padding: 8px 16px 4px;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 8px 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: #b0b8d4;
  text-decoration: none;
  cursor: pointer;
  border-radius: 0;
  transition: all 0.18s;
  position: relative;
  white-space: nowrap;
  user-select: none;
}

.nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
}

.nav-item.active {
  background: rgba(0,255,136,0.1);
  color: var(--primary-color, #00ff88);
  border-right: 3px solid var(--primary-color, #00ff88);
}

.nav-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  transition: color 0.18s;
}

.nav-item.nav-logout:hover {
  background: rgba(226,68,92,0.1);
  color: #e2445c;
}

.nav-badge {
  margin-left: auto;
  background: #e2445c;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  flex-shrink: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
}

.sidebar-avatar-wrap {
  flex-shrink: 0;
}

.sidebar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(0,255,136,0.4);
}

.sidebar-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.sidebar-role {
  display: block;
  font-size: 11px;
  color: #6b7280;
  text-transform: capitalize;
}

/* ================================================================
   MAIN WRAPPER + HEADER
================================================================ */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 64px;
  min-height: 64px;
  background: rgba(10,14,39,0.98);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(10px);
  z-index: 50;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #b0b8d4;
  font-size: 20px;
  cursor: pointer;
  padding: 6px;
}

.page-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notif-wrapper { position: relative; }

.notif-btn {
  position: relative;
  background: none;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  color: #b0b8d4;
  cursor: pointer;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
}

.notif-btn:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: #e2445c;
  border-radius: 50%;
}

.notif-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  background: #131829;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  z-index: 999;
  overflow: hidden;
}

.notif-dropdown.open { display: block; }

.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 14px;
  font-weight: 600;
}

.notif-dropdown-header button {
  background: none;
  border: none;
  color: var(--primary-color, #00ff88);
  font-size: 12px;
  cursor: pointer;
}

.notif-list { max-height: 360px; overflow-y: auto; }

.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  cursor: pointer;
  transition: background 0.2s;
}

.notif-item:hover { background: rgba(255,255,255,0.03); }

.notif-item.unread { background: rgba(0,255,136,0.03); }

.notif-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,115,234,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0073ea;
  flex-shrink: 0;
  font-size: 14px;
}

.notif-content { flex: 1; min-width: 0; }

.notif-content strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}

.notif-content p {
  font-size: 12px;
  color: #b0b8d4;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-content time {
  font-size: 11px;
  color: #6b7280;
  display: block;
  margin-top: 3px;
}

.notif-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 32px 16px;
  color: #6b7280;
  font-size: 14px;
}

.notif-empty i { font-size: 28px; }

.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.2s;
}

.header-user:hover { background: rgba(255,255,255,0.05); }

.header-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(0,255,136,0.3);
}

/* ================================================================
   CONTENT AREA + PAGES
================================================================ */
.content-area {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background: var(--bg-dark, #0a0e27);
}

.page { animation: fadePage 0.2s ease; }

@keyframes fadePage {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ================================================================
   TOOLBAR
================================================================ */
.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-box {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 8px 14px;
  gap: 10px;
  min-width: 220px;
}

.search-box i { color: #6b7280; font-size: 13px; }

.search-box input {
  background: none;
  border: none;
  color: #fff;
  font-size: 14px;
  outline: none;
  width: 100%;
  min-width: 160px;
}

.filter-select {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  color: #b0b8d4;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.filter-select:focus { border-color: var(--primary-color, #00ff88); }
.filter-select option { background: #131829; }

/* ---- Multi-select status filter ---- */
.status-filter-wrap {
  position: relative;
  display: inline-block;
}
.status-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.status-filter-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 500;
  background: #1a2035;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 8px 0;
  min-width: 180px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.status-filter-dropdown.open { display: block; }
.status-filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  font-size: 13px;
  color: #b0b8d4;
  cursor: pointer;
  transition: background 0.15s;
}
.status-filter-option:hover { background: rgba(255,255,255,0.06); }
.status-filter-option input[type="checkbox"] {
  accent-color: #00ff88;
  width: 14px;
  height: 14px;
  cursor: pointer;
  flex-shrink: 0;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.status-filter-clear {
  border-top: 1px solid rgba(255,255,255,0.07);
  margin-top: 6px;
  padding: 6px 14px 0;
}
.status-filter-clear button {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}
.status-filter-clear button:hover { color: #e2445c; }

/* ================================================================
   BUTTONS
================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color, #00ff88), #00d9ff);
  color: #0a0e27;
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,255,136,0.3); }

.btn-outline {
  background: transparent;
  color: var(--primary-color, #00ff88);
  border: 1.5px solid var(--primary-color, #00ff88);
}

.btn-outline:hover { background: rgba(0,255,136,0.1); }

.btn-danger {
  background: rgba(226,68,92,0.15);
  color: #e2445c;
  border: 1.5px solid rgba(226,68,92,0.3);
}

.btn-danger:hover { background: rgba(226,68,92,0.25); }

.btn-sm { padding: 6px 14px; font-size: 12px; }

.btn-full { width: 100%; justify-content: center; }

.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }

/* ================================================================
   TABELAS
================================================================ */
.table-wrap {
  background: #0d1126;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  overflow: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #6b7280;
  background: #0a0e1f;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: #e0e6f0;
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: rgba(255,255,255,0.025); }

.col-actions { text-align: right !important; width: 110px; }

.table-actions { display: flex; justify-content: flex-end; gap: 6px; }

.action-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all 0.2s;
}

.action-btn.edit { background: rgba(0,115,234,0.15); color: #0073ea; }
.action-btn.edit:hover { background: rgba(0,115,234,0.3); }
.action-btn.delete { background: rgba(226,68,92,0.12); color: #e2445c; }
.action-btn.delete:hover { background: rgba(226,68,92,0.25); }

.table-loading {
  text-align: center;
  padding: 40px;
  color: #6b7280;
  font-size: 14px;
}

/* ================================================================
   BADGES / TAGS
================================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.badge-pessoal  { background: rgba(0,115,234,0.15); color: #0073ea; }
.badge-empresa  { background: rgba(0,200,117,0.15); color: #00c875; }
.badge-bug      { background: rgba(226,68,92,0.15);  color: #e2445c; }
.badge-dev      { background: rgba(0,115,234,0.15);  color: #0073ea; }
.badge-atend    { background: rgba(0,200,117,0.15);  color: #00c875; }

/* ================================================================
   MONDAY GRID
================================================================ */
.monday-container {
  background: #0d1126;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  overflow: hidden;
}

.monday-scroll {
  overflow-x: auto;
  max-height: calc(100vh - 260px);
  overflow-y: auto;
}

.monday-table {
  border-collapse: collapse;
  font-size: 13px;
  min-width: 100%;
}

.monday-table thead {
  position: sticky;
  top: 0;
  z-index: 30;
}

.monday-th {
  background: #0a0e1f;
  border-right: 1px solid rgba(255,255,255,0.06);
  border-bottom: 2px solid rgba(255,255,255,0.08);
  padding: 0;
  white-space: nowrap;
  user-select: none;
  min-width: 80px;
}

.monday-th:first-child {
  position: sticky;
  left: 0;
  z-index: 40;
  min-width: 48px;
  width: 48px;
}

.monday-th.dragging { opacity: 0.4; }
.monday-th.drag-over { border-left: 2px solid var(--primary-color, #00ff88); }

.th-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #6b7280;
  cursor: grab;
}

.th-inner:active { cursor: grabbing; }
.th-inner .th-hide { display: none; margin-left: auto; cursor: pointer; }
.monday-th:hover .th-hide { display: block; color: #6b7280; }
.th-hide:hover { color: #e2445c !important; }

.monday-td {
  border-right: 1px solid rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  padding: 0;
  vertical-align: middle;
  position: relative;
}

.monday-td:first-child {
  position: sticky;
  left: 0;
  z-index: 10;
  background: #0d1126;
  text-align: center;
}

.monday-table tbody tr:hover .monday-td { background: rgba(255,255,255,0.02); }
.monday-table tbody tr:hover .monday-td:first-child { background: #111628; }

.cell-content {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  min-height: 42px;
  cursor: pointer;
  color: #e0e6f0;
}

.cell-content:hover { background: rgba(255,255,255,0.04); }

.cell-input {
  width: 100%;
  background: rgba(0,115,234,0.12);
  border: 1.5px solid #0073ea;
  color: #fff;
  padding: 7px 10px;
  font-size: 13px;
  outline: none;
  border-radius: 4px;
  box-sizing: border-box;
}

.cell-select {
  width: 100%;
  background: rgba(0,115,234,0.12);
  border: 1.5px solid #0073ea;
  color: #fff;
  padding: 7px 10px;
  font-size: 13px;
  outline: none;
  border-radius: 4px;
  cursor: pointer;
}

.cell-select option { background: #131829; }

/* Status cell */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.status-badge:hover { opacity: 0.8; }

/* Status popup */
.status-popup {
  position: fixed;
  background: #131829;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 8px;
  z-index: 9999;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  min-width: 180px;
}

.status-popup-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s;
}

.status-popup-item:hover { background: rgba(255,255,255,0.05); }

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Responsible cell */
.responsible-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.responsible-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}

/* Column manager panel */
.col-manager-panel {
  background: #131829;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
}

.col-manager-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 14px;
  font-weight: 600;
}

.col-manager-header button {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  font-size: 16px;
}

.col-manager-body {
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.col-manager-footer {
  padding: 10px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.col-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.18s;
  color: #b0b8d4;
}

.col-toggle.active {
  background: rgba(0,255,136,0.1);
  border-color: rgba(0,255,136,0.3);
  color: var(--primary-color, #00ff88);
}

.col-toggle i { font-size: 11px; }

.monday-add-row {
  padding: 10px 16px;
  color: #6b7280;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid rgba(255,255,255,0.04);
  transition: all 0.18s;
}

.monday-add-row:hover { color: var(--primary-color, #00ff88); background: rgba(0,255,136,0.03); }

/* ================================================================
   DASHBOARD
================================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #0d1126;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-card.blue .stat-icon  { background: rgba(0,115,234,0.15);  color: #0073ea; }
.stat-card.green .stat-icon { background: rgba(0,200,117,0.15);  color: #00c875; }
.stat-card.orange .stat-icon{ background: rgba(242,169,0,0.15);  color: #f2a900; }
.stat-card.red .stat-icon   { background: rgba(226,68,92,0.15);  color: #e2445c; }

.stat-info h3 {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 2px;
}

.stat-info p {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 16px;
}

.dash-card {
  background: #0d1126;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 20px;
}

.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.dash-card-header h3 { font-size: 15px; font-weight: 700; margin: 0; }

.recent-list { display: flex; flex-direction: column; gap: 8px; }

.recent-ticket-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.025);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s;
}

.recent-ticket-item:hover { background: rgba(255,255,255,0.05); }

.recent-ticket-info { flex: 1; min-width: 0; }
.recent-ticket-info strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-ticket-info span   { font-size: 11px; color: #6b7280; }

.status-chart-wrap { display: flex; flex-direction: column; gap: 10px; }

.status-bar-item { margin-bottom: 2px; }
.status-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 4px;
  color: #b0b8d4;
}

.status-bar-track {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
}

.status-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

/* ================================================================
   CONTRATOS (Card Grid)
================================================================ */
.contracts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.contract-card {
  background: #0d1126;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.contract-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }

.contract-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.contract-card.ativo::before    { background: #00c875; }
.contract-card.pendente::before { background: #f2a900; }
.contract-card.expirado::before { background: #e2445c; }
.contract-card.cancelado::before{ background: #6b7280; }

.contract-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.contract-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  flex: 1;
}

.contract-status-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.cs-ativo    { background: rgba(0,200,117,0.15); color: #00c875; }
.cs-pendente { background: rgba(242,169,0,0.15);  color: #f2a900; }
.cs-expirado { background: rgba(226,68,92,0.15);  color: #e2445c; }
.cs-cancelado{ background: rgba(107,114,128,0.15);color: #9ca3af; }

.contract-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.contract-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #b0b8d4;
}

.contract-meta-item i { color: #6b7280; width: 14px; font-size: 12px; }
.contract-meta-item strong { color: #fff; font-weight: 600; }

.contract-deadline {
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 6px;
}

.contract-deadline.near    { background: rgba(242,169,0,0.12);  color: #f2a900; border: 1px solid rgba(242,169,0,0.2); }
.contract-deadline.ok      { background: rgba(0,200,117,0.08);  color: #00c875; border: 1px solid rgba(0,200,117,0.15); }
.contract-deadline.expired { background: rgba(226,68,92,0.08);  color: #e2445c; border: 1px solid rgba(226,68,92,0.15); }

.contract-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.contract-actions .btn { flex: 1; justify-content: center; }

/* ================================================================
   PERFIL
================================================================ */
.profile-wrap {
  max-width: 700px;
  margin: 0 auto;
}

.profile-card {
  background: #0d1126;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 36px;
}

.profile-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 32px;
}

.profile-avatar-ring {
  position: relative;
  width: 100px;
  height: 100px;
  margin-bottom: 10px;
}

.profile-avatar-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(0,255,136,0.4);
  display: block;
}

.avatar-change-btn {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary-color, #00ff88);
  color: #0a0e27;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.avatar-change-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0,255,136,0.3);
}

.avatar-hint { font-size: 12px; color: #6b7280; }

.profile-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 28px 0;
}

.password-section h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ================================================================
   MEUS CHAMADOS (Cliente)
================================================================ */
.chamados-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chamado-card {
  background: #0d1126;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 18px 20px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.chamado-card:hover {
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.chamado-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 12px;
}

.chamado-id { font-size: 11px; color: #6b7280; font-weight: 600; }

.chamado-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  flex: 1;
}

/* ================================================================
   FUNCIONÁRIOS — Tabela de permissões
================================================================ */
.perms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.perm-label {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.2s;
  color: #b0b8d4;
  font-size: 13px;
  user-select: none;
}

.perm-label:hover {
  background: rgba(0,255,136,0.08);
  border-color: rgba(0,255,136,0.3);
  color: #e0e6f0;
}

.perm-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #00ff88;
  cursor: pointer;
  flex-shrink: 0;
}

.perm-label i {
  color: #00ff88;
  font-size: 13px;
}

/* Checkbox inline na tabela de funcionários */
.perm-table-check {
  width: 18px;
  height: 18px;
  accent-color: #00ff88;
  cursor: pointer;
}

.perm-table-check:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Célula de permissão centralizada */
.perm-cell {
  text-align: center;
  vertical-align: middle;
}

/* ================================================================
   CONFIGURAÇÕES — Página de segurança
================================================================ */
#page-settings .profile-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: #e0e6f0;
  display: flex;
  align-items: center;
  gap: 8px;
}


.chamado-obs {
  font-size: 13px;
  color: #b0b8d4;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chamado-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.chamado-date { font-size: 11px; color: #6b7280; margin-left: auto; }

/* ================================================================
   MODAIS
================================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  animation: modalFadeIn 0.18s ease;
}

.modal-overlay.open {
  display: flex;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-box {
  background: #131829;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  width: 100%;
  max-width: 580px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
  animation: modalSlideIn 0.2s ease;
}

.modal-lg { max-width: 760px; }
.modal-sm { max-width: 460px; }

@keyframes modalSlideIn {
  from { transform: translateY(-20px) scale(0.97); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.modal-header h3 { font-size: 16px; font-weight: 700; margin: 0; }

.modal-close {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
  transition: color 0.18s;
}

.modal-close:hover { color: #e2445c; }

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

/* File upload area */
.file-drop-area {
  border: 2px dashed rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.file-drop-area:hover {
  border-color: var(--primary-color, #00ff88);
  color: var(--primary-color, #00ff88);
  background: rgba(0,255,136,0.03);
}

.file-drop-area i { font-size: 28px; }

/* ================================================================
   TOAST NOTIFICATIONS
================================================================ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  pointer-events: auto;
  animation: toastIn 0.3s ease;
  max-width: 340px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.1);
}

.toast.success { background: #0d1f18; border-color: rgba(0,200,117,0.3); }
.toast.success i { color: #00c875; }
.toast.error   { background: #200a10; border-color: rgba(226,68,92,0.3); }
.toast.error i { color: #e2445c; }
.toast.info    { background: #0d1628; border-color: rgba(0,115,234,0.3); }
.toast.info i  { color: #0073ea; }
.toast.warning { background: #1e1500; border-color: rgba(242,169,0,0.3); }
.toast.warning i { color: #f2a900; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); max-height: 80px; }
  to   { opacity: 0; transform: translateX(40px); max-height: 0; padding: 0; margin: 0; }
}

/* ================================================================
   DETAIL MODAL (Ticket)
================================================================ */
.detail-section { margin-bottom: 20px; }
.detail-section h4 { font-size: 12px; font-weight: 700; color: #6b7280; letter-spacing: 0.8px; text-transform: uppercase; margin: 0 0 10px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-item label { display: block; font-size: 11px; color: #6b7280; margin-bottom: 3px; }
.detail-item p { margin: 0; font-size: 14px; }
.detail-obs { background: rgba(255,255,255,0.03); border-radius: 8px; padding: 12px; font-size: 13px; color: #b0b8d4; line-height: 1.6; }

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -240px;
    height: 100vh;
    z-index: 200;
    transition: left 0.25s ease, width 0.25s ease;
  }
  .sidebar.mobile-open { left: 0; }
  .sidebar.collapsed { left: -240px; }
  .mobile-menu-btn { display: flex; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .form-row { grid-template-columns: 1fr; }
  .form-flex-2 { grid-column: span 1; }
  .page-toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-left, .toolbar-right { flex-wrap: wrap; }
  .monday-scroll { max-height: calc(100vh - 320px); }
  .content-area { padding: 16px; }
  .contracts-grid { grid-template-columns: 1fr; }
  .notif-dropdown { right: -60px; width: 300px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .login-card { padding: 28px 22px; }
  .modal-box { border-radius: 12px; }
  .contract-actions { flex-direction: column; }
}
