@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&family=Sarabun:wght@400;700&display=swap');

:root {
  --bg: #0a0e1a;
  --surface: #111827;
  --surface2: #1a2235;
  --border: #1e2d47;
  --accent: #4632DA;
  --accent2: #06D9FA;
  --grad-primary: linear-gradient(135deg, #4632DA 0%, #06D9FA 100%);
  --grad-primary-hover: linear-gradient(135deg, #5744e0 0%, #20e0ff 100%);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --purple: #8b5cf6;
  --orange: #f97316;
  --text: #e2e8f0;
  --text-muted: #64748b;
  --bg-dark: #0a0e1a;
  --bg-hover: rgba(255, 255, 255, 0.03);
  --topbar-bg: rgba(10, 14, 26, 0.85);
  --chart-label: #e2e8f0;
  --chart-grid: rgba(30, 45, 71, 0.6);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 8px 24px rgba(70, 50, 218, 0.25);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

[data-theme="light"] {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface2: #f1f5f9;
  --border: #dae2ed;
  --text: #1a2235;
  --text-muted: #58667e;
  --bg-dark: #f3f6fa;
  --bg-hover: rgba(70, 50, 218, 0.04);
  --topbar-bg: rgba(255, 255, 255, 0.9);
  --chart-label: #1a2235;
  --chart-grid: rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 4px 6px rgba(10, 14, 26, 0.03);
  --shadow-md: 0 10px 15px rgba(10, 14, 26, 0.06);
  --shadow-lg: 0 20px 25px rgba(10, 14, 26, 0.1);
  --shadow-glow: 0 8px 16px rgba(70, 50, 218, 0.15);
}

body {
  transition: background-color 0.3s, color 0.3s;
}

:focus-visible {
  outline: unset;
}

.mi {
  font-family: 'Material Symbols Rounded';
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.mi-20 {
  font-size: 20px;
}

.mi-22 {
  font-size: 22px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Prompt', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

::placeholder {
  color: var(--text-muted);
  opacity: 0.8;
}

input::placeholder {
  color: var(--text-muted);
  opacity: 0.8;
}

/* โ”€โ”€ LOGIN โ”€โ”€ */
#login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 30% 20%, #0f2044 0%, var(--bg) 60%);
}

.login-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 48px;
  width: 420px;
  max-width: 420px;
  margin: 0 20px;
  box-shadow: var(--shadow-lg), 0 0 100px rgba(70, 50, 218, 0.1);
}

.login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo h1 {
  font-family: 'Prompt', sans-serif;
  font-size: 22px;
  color: var(--accent);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-logo p {
  color: var(--text-muted);
  font-size: 14px;
}

.login-label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
  margin-top: 18px;
}

.login-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text);
  font-family: 'Prompt', sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}

.login-input:focus {
  border-color: var(--accent);
}

.login-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--danger);
  font-size: 13px;
  margin-top: 14px;
  display: none;
}

.login-error.show {
  display: block;
}

.btn-login {
  width: 100%;
  margin-top: 24px;
  padding: 14px;
  background: var(--grad-primary);
  border: none;
  border-radius: 12px;
  color: white;
  font-family: 'Prompt', sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-glow);
}

.btn-login:hover {
  background: var(--grad-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(70, 50, 218, 0.35);
}

.login-forgot {
  text-align: center;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.login-forgot a {
  color: var(--accent);
  text-decoration: none;
}

.login-forgot a:hover {
  text-decoration: underline;
}



/* โ”€โ”€ APP โ”€โ”€ */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 240px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 0;
  z-index: 100;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo h2 {
  font-family: 'Prompt', sans-serif;
  font-size: 16px;
  font-weight: 700;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.user-badge {
  background: var(--surface2);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 12px 16px 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(70, 50, 218, 0.3);
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.user-role {
  font-size: 11px;
  color: var(--text-muted);
}

.nav-section {
  padding: 14px 24px 4px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  margin: 2px 12px;
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 13.5px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  position: relative;
}

.nav-item:hover {
  color: var(--text);
  background: var(--bg-hover);
  transform: translateX(4px);
}

.nav-item.active {
  color: #fff;
  background: var(--grad-primary);
  box-shadow: var(--shadow-glow);
}

.nav-item.active .mi {
  color: #fff;
}

.nav-item .nav-ic {
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 20px;
  min-width: 18px;
  text-align: center;
  line-height: 1.4;
}

.nav-badge.warn {
  background: var(--warning);
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.btn-logout {
  margin: 10px 16px 16px;
  padding: 10px;
  width: calc(100% - 32px);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  color: var(--danger);
  font-family: 'Prompt', sans-serif;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.2);
}

.main-content {
  margin-left: 240px;
  padding: 104px 32px 32px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* โ”€โ”€ TOPBAR โ”€โ”€ */
.topbar {
  position: fixed;
  top: 0;
  left: 240px;
  right: 0;
  z-index: 1045;
  background: var(--topbar-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .topbar {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-notif {
  position: relative;
}

.btn-notif {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.btn-notif:hover,
.btn-notif.active {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.1);
}

.notif-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--bg);
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 340px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s;
  z-index: 99999;
  overflow: hidden;
}

.notif-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.notif-dropdown-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface2);
}

.notif-dropdown-body {
  max-height: 360px;
  overflow-y: auto;
}

.dd-notif-item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(30, 45, 71, 0.5);
  text-decoration: none;
  transition: background 0.15s;
  position: relative;
}

.dd-notif-item:last-child {
  border-bottom: none;
}

.dd-notif-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* User Profile Dropdown Styles */
.user-profile-dd {
  position: relative;
  z-index: 99999;
}

.btn-profile-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  border-radius: 50%;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.btn-profile-toggle:hover {
  opacity: 0.8;
}

.profile-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 260px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  display: none;
  flex-direction: column;
  z-index: 99999;
  overflow: hidden;
  animation: slideDown 0.2s ease forwards;
}

.profile-dropdown-header>div {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-dropdown.show {
  display: flex;
}

.profile-dropdown-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  background: var(--surface2);
}

.profile-dropdown-body {
  padding: 8px 0;
}

.profile-dd-item {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Prompt', sans-serif;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s;
  font-size: 14px;
}

.profile-dd-item:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.profile-dd-item .mi {
  font-size: 18px;
}

.profile-dd-item.text-danger:hover {
  color: var(--danger);
}

.profile-dropdown-footer {
  border-top: 1px solid var(--border);
  padding: 4px 0;
}

.dd-notif-item.unread {
  background: rgba(59, 130, 246, 0.05);
}

.dd-notif-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dd-notif-content {
  flex: 1;
}

.dd-notif-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
  line-height: 1.3;
}

.dd-notif-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dd-notif-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

.dd-notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  position: absolute;
  top: 16px;
  right: 16px;
}

.notif-dropdown-footer {
  padding: 10px;
  border-top: 1px solid var(--border);
  background: var(--surface2);
  text-align: center;
}

.notif-dropdown-footer a:hover {
  color: var(--text) !important;
  text-decoration: underline !important;
}

.btn-logout-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  color: var(--danger);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-logout-top:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
}

.page-title {
  font-family: 'Prompt', sans-serif;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 0;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

/* โ”€โ”€ STAT CARDS โ”€โ”€ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.stat-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.stat-card::before {
  display: none;
}

.stat-card-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-hover) !important;
  color: var(--accent) !important;
}

.stat-icon.red { color: var(--danger) !important; }
.stat-icon.green { color: var(--success) !important; }
.stat-icon.yellow { color: var(--warning) !important; }

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.stat-value {
  font-family: 'Prompt', sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
}

.stat-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 5px;
}

/* โ”€โ”€ CHARTS โ”€โ”€ */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}

.chart-card.c12 {
  grid-column: span 12;
}

.chart-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-title .mi {
  color: var(--accent2);
}

canvas {
  max-height: 280px;
}

/* โ”€โ”€ FORMS โ”€โ”€ */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full {
  grid-column: 1 / -1;
}

label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text);
  font-family: 'Prompt', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
  height: 42px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(70, 50, 218, 0.12);
}

select option {
  background: var(--surface2);
}

textarea {
  resize: vertical;
  min-height: 80px;
  height: auto;
}

/* โ”€โ”€ SECTION CARDS โ”€โ”€ */
.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.section-header {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* โ”€โ”€ BUTTONS โ”€โ”€ */
.btn {
  height: 42px;
  padding: 0 20px;
  border-radius: 10px;
  border: none;
  font-family: 'Prompt', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--grad-primary);
  color: white;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  background: var(--grad-primary-hover);
  box-shadow: 0 10px 20px rgba(70, 50, 218, 0.35);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #059669;
}

.btn-warning {
  background: var(--warning);
  color: white;
}

.btn-warning:hover {
  background: #d97706;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: var(--surface2);
  color: var(--text);
}

.btn-sm {
  padding: 0 12px;
  font-size: 12px;
  height: 34px;
}

/* Moved btn-danger-o below icon-btn for specificity */

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* โ”€โ”€ TABLE โ”€โ”€ */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th {
  background: var(--bg);
  padding: 11px 14px;
  text-align: left;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.td-checkbox {
  width: 48px;
  text-align: center;
  padding: 0;
}

.custom-checkbox {
  width: 18px !important;
  height: 18px !important;
  margin: 0;
  cursor: pointer;
  accent-color: var(--accent);
}

td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(30, 45, 71, 0.6);
  color: var(--text);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.td-actions {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  align-items: center;
  width: fit-content;
  margin-left: auto;
  justify-content: flex-end;
}

td:has(> .td-actions) {
  white-space: nowrap;
  width: 1%;
  text-align: right;
}

.table-wrap th:last-child,
.table-wrap td:last-child {
  text-align: right;
}

/* โ”€โ”€ BADGES โ”€โ”€ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-green {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.badge-red {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.badge-yellow {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.badge-blue {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent);
}

.badge-cyan {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent2);
}

.badge-purple {
  background: rgba(139, 92, 246, 0.15);
  color: var(--purple);
}

.badge-gray {
  background: rgba(100, 116, 139, 0.15);
  color: var(--text-muted);
}

/* โ”€โ”€ FILTER ROW โ”€โ”€ */
.filter-row {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
}

.filter-row .form-group {
  margin: 0;
  min-width: 140px;
}

.filter-row input,
.filter-row select {
  padding: 8px 12px;
  font-size: 13px;
  height: 42px;
}

.filter-row .btn {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
}

/* โ”€โ”€ MODAL โ”€โ”€ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-family: 'Prompt', sans-serif;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  width: 32px;
  height: 32px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* โ”€โ”€ HOSTING / DOC CARDS โ”€โ”€ */
.hosting-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.host-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  transition: border-color 0.2s, transform 0.15s;
}

.host-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-1px);
}

.host-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 8px;
}

.host-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
}

.host-provider {
  font-size: 12px;
  color: var(--text-muted);
}

.host-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
  margin-bottom: 10px;
}

.host-meta-item label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  display: block;
  margin-bottom: 1px;
}

.host-meta-item span {
  font-size: 12px;
  color: var(--text);
  font-family: monospace;
}

.host-meta-item a {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
}

.host-meta-item a:hover {
  text-decoration: underline;
}

.host-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
  gap: 8px;
}

.expire-ok {
  font-size: 12px;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 4px;
}

.expire-warn {
  font-size: 12px;
  color: var(--warning);
  display: flex;
  align-items: center;
  gap: 4px;
}

.expire-danger {
  font-size: 12px;
  color: var(--danger);
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.doc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  transition: all 0.15s;
}

.doc-card:hover {
  border-color: rgba(59, 130, 246, 0.35);
  transform: translateY(-2px);
}

.doc-amount {
  font-family: 'Prompt', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent2);
}

/* โ”€โ”€ NOTIF โ”€โ”€ */
.notif-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.notif-item {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(30, 45, 71, 0.5);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: background 0.15s;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.notif-body {
  flex: 1;
}

.notif-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 3px;
}

.notif-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.notif-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* โ”€โ”€ MISC โ”€โ”€ */
.text-right {
  text-align: right;
}

.text-success {
  color: var(--success);
}

.text-danger {
  color: var(--danger);
}

.text-muted {
  color: var(--text-muted);
}

.fw-600 {
  font-weight: 600;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.page-header-actions form.report-filter-form {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.page-header-actions button.btn {
  height: stretch;
}

.icon-btn {
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 0;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  text-decoration: none;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}

.icon-btn:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-danger-o {
  background: rgba(239, 68, 68, 0.1) !important;
  color: var(--danger) !important;
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
}

.btn-danger-o:hover {
  background: rgba(239, 68, 68, 0.18) !important;
  border-color: var(--danger) !important;
}

.info-box {
  background: rgba(59, 130, 246, 0.07);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.three-col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

/* โ”€โ”€ FLASH MESSAGES โ”€โ”€ */
.flash-success {
  margin-bottom: 20px;
  padding: 12px 16px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 10px;
  color: var(--success);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.flash-error {
  margin-bottom: 20px;
  padding: 12px 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 10px;
  color: var(--danger);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.7);
}

@media (max-width: 1023px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 9999;
    transition: transform 0.3s ease;
  }

  .main-content {
    margin-left: 0;
    padding: 104px 16px 16px;
    min-height: 100vh;
  }

  .topbar {
    left: 0;
    margin-left: 0;
    margin-right: 0;
    padding-left: 60px;
    padding-right: 16px;
    min-height: 80px;
  }

  .topbar-right {
    gap: 10px !important;
  }

  .topbar-left {
    margin-left: 10px;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-menu-btn {
    display: flex !important;
  }

  .logout-text {
    display: none;
  }

  .btn-logout-top {
    padding: 8px;
  }

  .notif-dropdown {
    right: -50px;
    width: 300px;
  }

  .btn-notif,
  button#btnProfileToggle>.user-avatar {
    width: 30px !important;
    height: 30px !important;
  }

  .page-title {
    font-size: 18px !important;
  }

  .page-title span.mi {
    font-size: 20px;
  }
}

.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 20px;
  left: 16px;
  z-index: 1060;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
}

/* โ”€โ”€ OPTION MODAL โ”€โ”€ */
.option-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.option-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.option-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.option-modal-header h3 {
  font-family: 'Prompt', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-close-modal {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.15s;
}

.btn-close-modal:hover {
  color: var(--text);
  background: var(--surface2);
}

.option-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.option-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  transition: border-color 0.15s;
}

.option-item:hover {
  border-color: rgba(59, 130, 246, 0.3);
}

.option-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.option-key {
  font-size: 12px;
  color: var(--text-muted);
  font-family: monospace;
}

.option-item-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.option-edit-row {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.option-edit-row input,
.option-edit-row select {
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--text);
  font-family: 'Prompt', sans-serif;
  font-size: 13px;
  outline: none;
}

.option-item.editing {
  background: rgba(59, 130, 246, 0.05);
  border-color: rgba(59, 130, 246, 0.3);
}

/* โ”€โ”€ CONFIRM DIALOG โ”€โ”€ */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}

.confirm-overlay.open {
  opacity: 1;
  visibility: visible;
}

.confirm-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  width: 380px;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.9) translateY(10px);
  transition: transform 0.2s;
}

.confirm-overlay.open .confirm-box {
  transform: scale(1) translateY(0);
}

.confirm-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.confirm-icon .mi {
  color: var(--warning);
  font-size: 26px;
}

.confirm-msg {
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 24px;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.confirm-actions .btn {
  min-width: 100px;
  justify-content: center;
}

/* โ”€โ”€ TOAST NOTIFICATIONS โ”€โ”€ */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: auto;
  min-width: 250px;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-success {
  border-left: 3px solid var(--success);
}

.toast-success .mi {
  color: var(--success);
}

.toast-error {
  border-left: 3px solid var(--danger);
}

.toast-error .mi {
  color: var(--danger);
}

.toast-warning {
  border-left: 3px solid var(--warning);
}

.toast-warning .mi {
  color: var(--warning);
}

.toast-info {
  border-left: 3px solid var(--accent);
}

.toast-info .mi {
  color: var(--accent);
}

/* โ”€โ”€ TOM SELECT DARK THEME OVERRIDES โ”€โ”€ */
/* โ”€โ”€ TOM SELECT ENHANCED SEARCH UI โ”€โ”€ */
/* โ”€โ”€ TOM SELECT ENHANCED SEARCH UI โ”€โ”€ */
.ts-control {
  background: var(--surface2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  color: var(--text) !important;
  padding: 0 14px !important;
  height: 42px !important;
  min-height: 42px !important;
  font-family: inherit !important;
  font-size: 14px !important;
  transition: all 0.2s ease !important;
  box-shadow: none !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
}

.ts-wrapper {
  width: 100% !important;
  flex: 1;
  position: relative !important;
  /* Anchor for the absolute dropdown */
}

.ts-wrapper.dropdown-active {
  z-index: 100 !important;
  /* Above standard form elements */
}

.ts-wrapper.focus .ts-control {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

.ts-wrapper.is-placeholder .ts-control {
  color: var(--text-muted) !important;
}

.ts-dropdown {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  width: 100% !important;
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  color: var(--text) !important;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7) !important;
  margin-top: 8px !important;
  /* Visual gap to prevent overlap with the control */
  overflow: hidden !important;
  padding: 0 !important;
  animation: dropdownFadeIn 0.15s ease-out !important;
  min-width: 240px !important;
  z-index: 999 !important;
  /* Above modals (500) but below topbar (1045) */
}

/* Right alignment for controls near the right edge of the screen */
.ts-wrapper.ts-align-right .ts-dropdown {
  left: auto !important;
  right: 0 !important;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Integrated Search Bar inside Dropdown */
.ts-dropdown .dropdown-input-wrap {
  padding: 10px !important;
  background: var(--surface2) !important;
  border-bottom: 1px solid var(--border) !important;
  position: relative !important;
}

.ts-dropdown .dropdown-input-wrap::before {
  content: "search";
  font-family: 'Material Symbols Rounded';
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 18px;
  pointer-events: none;
  z-index: 2;
}

.ts-dropdown .dropdown-input {
  background: var(--bg-dark) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px !important;
  color: var(--text) !important;
  padding: 8px 12px 8px 36px !important;
  font-size: 13.5px !important;
  width: 100% !important;
  outline: none !important;
  transition: all 0.2s !important;
}

.ts-dropdown .dropdown-input:focus {
  border-color: var(--accent) !important;
  background: rgba(0, 0, 0, 0.3) !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1) !important;
}

.ts-dropdown .option {
  padding: 10px 16px !important;
  font-size: 13.5px !important;
  transition: background 0.15s !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  min-height: 44px;
}

.ts-dropdown .option.active {
  background: rgba(59, 130, 246, 0.12) !important;
  color: var(--accent) !important;
}

.ts-dropdown .option:hover:not(.active) {
  background: rgba(255, 255, 255, 0.04) !important;
}

.ts-dropdown .no-results {
  padding: 20px !important;
  text-align: center !important;
  color: var(--text-muted) !important;
  font-size: 13px !important;
}

/* Hide redundant input in main control */
.ts-wrapper.single.dropdown-input-wrap .ts-control input {
  display: none !important;
}

.ts-wrapper.single .ts-control:after {
  border-color: var(--text-muted) transparent transparent transparent !important;
  right: 14px !important;
  margin-top: -2px !important;
}

.ts-wrapper.single.dropdown-active .ts-control:after {
  border-color: transparent transparent var(--text-muted) transparent !important;
  margin-top: -5px !important;
}

.table-container,
.table-card {
  overflow-x: auto;
}


/* Responsive */

@media (max-width: 900px) {

  .page-header-actions form.report-filter-form {
    justify-content: flex-start;
  }

  .three-col {
    grid-template-columns: 1fr;
  }

  .page-header-actions {
    justify-content: flex-start;
  }

}

/* โ”€โ”€ VIEW MODAL ENHANCEMENTS โ”€โ”€ */
.view-modal-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.view-header {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.view-title-big {
  font-size: 17px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.4;
  margin-bottom: 4px;
}

.view-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.view-card-simple {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}

.view-label-sm {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
  letter-spacing: 0.8px;
  font-weight: 700;
}

.view-value-md {
  font-size: 13.5px;
  color: var(--text);
  font-weight: 500;
}

.view-summary-box {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.06), rgba(6, 182, 212, 0.06));
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 12px;
  padding: 18px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.summary-line.total {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.summary-label {
  font-size: 12.5px;
  color: var(--text-muted);
}

.summary-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.summary-value.total {
  font-size: 22px;
  color: var(--accent2);
}

@media (max-width: 600px) {
  .view-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* --- Bulk Action Toolbar --- */
.bulk-toolbar {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  transition: bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1040;
}

.bulk-toolbar.show {
  bottom: 32px;
}

.bulk-toolbar-info {
  font-weight: 500;
  font-size: 15px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.bulk-toolbar-actions {
  display: flex;
  gap: 10px;
  border-left: 1px solid var(--border);
  padding-left: 16px;
}

/* ฤฤ FLATPICKR CUSTOMIZATION (Ultra-Dark Modern Theme) ฤฤ */
.flatpickr-calendar {
  width: 312px !important;
  background: #111827 !important;
  background: linear-gradient(145deg, #111827 0%, #0f172a 100%) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.03) inset !important;
  border-radius: 32px !important;
  margin-top: 15px !important;
  font-family: 'Prompt', sans-serif !important;
  padding: 16px !important;
  overflow: hidden !important;
  animation: fpFadeInDown 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes fpFadeInDown {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowTop:after {
  display: none !important;
}

.flatpickr-months {
  padding: 0 0 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.flatpickr-month {
  height: 48px !important;
  color: #fff !important;
}

.flatpickr-current-month {
  position: static !important;
  padding: 0 !important;
  width: auto !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex: 1 !important;
  justify-content: center !important;
  height: 100%;
}

.flatpickr-months .flatpickr-month {
  background: unset;
  padding: 0 8px;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
  font-family: inherit !important;
  font-weight: 700 !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  padding: 8px 16px !important;
  cursor: pointer !important;
  outline: none !important;
  font-size: 15px !important;
  transition: all 0.2s !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  height: 100%;
  margin: 0;
  box-shadow: unset;
}

.flatpickr-current-month .flatpickr-monthDropdown-months:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(6, 182, 212, 0.5) !important;
}

.flatpickr-current-month .numInputWrapper {
  width: 85px !important;
  height: 100%;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  padding: 6px 4px !important;
  transition: all 0.2s !important;
}

.numInputWrapper span {
  border: none;
  background: unset !important;
}

.flatpickr-current-month .numInputWrapper:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(6, 182, 212, 0.5) !important;
}

.flatpickr-current-month .numInputWrapper input {
  font-weight: 700 !important;
  color: #fff !important;
  font-size: 15px !important;
  background: unset;
  border: none;
  padding: 0 10px;
  box-shadow: unset;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  position: static !important;
  height: 48px !important;
  width: 48px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  padding: 0 !important;
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(6, 182, 212, 0.5) !important;
  transform: scale(1.05) !important;
}

.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg {
  fill: #fff !important;
  width: 14px !important;
  height: 14px !important;
}

.flatpickr-weekdays {
  padding: 8px 0 !important;
  background: transparent !important;
}

span.flatpickr-weekday {
  font-size: 13px !important;
  font-weight: 800 !important;
  color: #06b6d4 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  background: unset;
}

.flatpickr-calendar .flatpickr-months .flatpickr-prev-month,
.flatpickr-calendar .flatpickr-months .flatpickr-next-month {
  width: 35px !important;
}

.numInputWrapper span.arrowUp:after {
  top: 50%;
}

.numInputWrapper span.arrowDown:after {
  top: unset;
  bottom: 50%;
}

.flatpickr-days {
  width: 280px !important;
  padding: 4px 0 0 !important;
}

.dayContainer {
  width: 280px !important;
  min-width: 280px !important;
  max-width: 280px !important;
}

.flatpickr-day {
  height: 38px !important;
  line-height: 36px !important;
  max-width: 38px !important;
  width: 38px !important;
  font-size: 15px !important;
  border-radius: 14px !important;
  margin: 1px !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  color: #f8fafc !important;
  border: 1px solid transparent !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.flatpickr-day.today {
  border-color: rgba(6, 182, 212, 0.3) !important;
  color: #06b6d4 !important;
  font-weight: 700 !important;
  background: rgba(6, 182, 212, 0.05) !important;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.selected:focus {
  background: linear-gradient(180deg, #38bdf8 0%, #2563eb 100%) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 8px 20px -6px rgba(37, 99, 235, 0.8) !important;
  transform: scale(1.05) !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
}

.flatpickr-day:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
  color: rgba(255, 255, 255, 0.12) !important;
  pointer-events: none !important;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
  color: rgba(255, 255, 255, 0.1) !important;
}