/* ==========================================================================
   GLOBAL CSS - ITSM MASTER DATA & AUTHENTICATION
   THEME: Ultra Premium Light Blue-Yellow & Glassmorphism
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=DM+Mono:wght@400;500&display=swap');
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css');

:root {
  /* Color Palette */
  --bg-main: #f0f4fa;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --bg-glass-hover: rgba(255, 255, 255, 0.95);
  --border-glass: rgba(255, 255, 255, 0.6);
  
  --primary: #0252cd;
  --primary-hover: #0242a5;
  --primary-light: #e6effc;
  --secondary: #ffb800;
  --secondary-hover: #e0a100;
  --secondary-light: #fff8e6;
  
  --success: #00b074;
  --success-light: #e6f7f1;
  --danger: #ff4a55;
  --danger-light: #ffeeed;
  --warning: #ff9800;
  --warning-light: #fff5e6;
  --info: #00b4d8;
  --info-light: #e6f8fb;
  
  --text-main: #1e293b;
  --text-sub: #64748b;
  --text-muted: #94a3b8;
  
  --border-color: #e2e8f0;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.05);
  --shadow-lg: 0 12px 32px rgba(2, 82, 205, 0.08);
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.04);
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ==========================================================================
   TOAST / NOTIFICATION SYSTEM
   ========================================================================== */
#toastContainer {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast-msg {
  pointer-events: auto;
  min-width: 300px;
  max-width: 420px;
  padding: 16px 20px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border-left: 6px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 16px;
  animation: toastSlideIn 0.3s cubic-bezier(0.2, 1, 0.4, 1);
  transition: var(--transition);
}

.toast-msg.success { border-left-color: var(--success); }
.toast-msg.error { border-left-color: var(--danger); }
.toast-msg.warning { border-left-color: var(--warning); }

.toast-icon {
  font-size: 22px;
}
.toast-msg.success .toast-icon { color: var(--success); }
.toast-msg.error .toast-icon { color: var(--danger); }
.toast-msg.warning .toast-icon { color: var(--warning); }

.toast-content {
  flex: 1;
}
.toast-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 2px;
  color: var(--text-main);
}
.toast-desc {
  font-size: 13px;
  color: var(--text-sub);
}

@keyframes toastSlideIn {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast-leave {
  transform: translateX(120%);
  opacity: 0;
}

/* ==========================================================================
   TOPBAR ENHANCEMENTS
   ========================================================================== */
.tb-actions .nav-btn.purple {
  background-color: #6366f1;
  color: #fff;
  border: none;
}
.tb-actions .nav-btn.purple:hover {
  background-color: #4f46e5;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.tb-actions .nav-btn.danger-btn {
  background-color: var(--danger);
  color: #fff;
  border: none;
}
.tb-actions .nav-btn.danger-btn:hover {
  background-color: #e03842;
  box-shadow: 0 4px 12px rgba(255, 74, 85, 0.25);
}

/* ==========================================================================
   AUTH / LOGIN PAGE
   ========================================================================== */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at 0% 0%, #e1edff 0%, #f0f4fa 50%, #fff8e6 100%);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 20px 40px rgba(0,0,0,0.04);
  padding: 48px 40px;
  transition: var(--transition);
}
.auth-card:hover {
  background: var(--bg-glass-hover);
  box-shadow: var(--shadow-lg), 0 25px 50px rgba(0,0,0,0.08);
}

.auth-header {
  text-align: center;
  margin-bottom: 36px;
}
.auth-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  background: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(2, 82, 205, 0.3);
}
.auth-logo img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.auth-logo i {
  font-size: 36px;
  color: #ffffff;
}
.auth-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
}
.auth-subtitle {
  font-size: 15px;
  color: var(--text-sub);
  margin-top: 4px;
}

.form-group {
  margin-bottom: 24px;
}
.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}
.input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon-wrap i {
  position: absolute;
  left: 16px;
  font-size: 18px;
  color: var(--text-muted);
  transition: var(--transition);
}
.form-control, .form-select {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-main);
  background: #ffffff;
  border: 1px solid #dde5f2;
  border-radius: 8px;
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.form-control:hover, .form-select:hover {
  border-color: #b8ccec;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 86, 176, 0.08);
}
.form-control:focus, .form-select:focus {
  border-color: #1a56b0;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(26, 86, 176, 0.15), 0 0 0 3px rgba(26, 86, 176, 0.1);
  background: #fcfdfd;
}
.form-control:focus ~ i {
  color: #1a56b0;
}

.btn-primary {
  width: 100%;
  padding: 15px;
  font-size: 16px;
  font-weight: 700;
  color: #0f1f3d;
  background: var(--secondary);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 6px 20px rgba(255, 184, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.btn-primary:hover {
  background: var(--secondary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 184, 0, 0.35);
}
.btn-primary:active {
  transform: translateY(0);
}

/* ==========================================================================
   SPLIT AUTH / LOGIN PAGE (NEW DESIGN)
   ========================================================================== */
.split-auth-wrapper {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  overflow: hidden;
  background: #ffffff;
}

.split-auth-card {
  position: relative;
  width: 100%;
  height: 100%;
  background: #ffffff;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  overflow: hidden;
  border: none;
}

/* Mobile Top Blue Header with Cloud Wave (Displayed on Mobile Only) */
.mobile-top-header {
  display: none;
  width: 100%;
  background: linear-gradient(135deg, #0242a5 0%, #0d9488 100%);
  position: relative;
  padding: 40px 20px 60px;
  text-align: center;
}
.mobile-logo-box {
  width: 76px;
  height: 76px;
  background: #ffffff;
  border-radius: 50%;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  border: 3px solid rgba(255, 255, 255, 0.8);
}
.mobile-logo-box img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.mobile-brand-name {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.mobile-cloud-divider {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}
.mobile-cloud-divider svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 50px;
}

/* Left Form Panel */
.split-form-panel {
  width: 50%;
  padding: 24px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(135deg, #e6effc 0%, #ffffff 50%, #e1edff 100%);
  position: relative;
  z-index: 2;
  overflow: hidden;
}

/* Rotating Blue-White Gradient Aura Background */
.rotating-bg-aura {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 500px;
  height: 500px;
  margin-top: -250px;
  margin-left: -250px;
  background: linear-gradient(135deg, #0242a5 0%, #ffffff 50%, #00b4d8 100%);
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  filter: blur(60px);
  opacity: 0.25;
  z-index: 1;
  pointer-events: none;
  animation: spinAura 12s linear infinite;
}
@keyframes spinAura {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.1); }
  100% { transform: rotate(360deg) scale(1); }
}

/* Enclosed Inner Card Container with Glassmorphism Effect */
.inner-form-container.glass-effect {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 460px;
  margin: auto;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 32px 40px;
  border-radius: 20px;
  box-shadow: 0 15px 50px rgba(2, 66, 165, 0.12),
              inset 0 1px 2px rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-top: 5px solid #0252cd !important;
}

/* Enclosed Brand Header Inside Container */
.split-brand-enclosed {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(2, 66, 165, 0.1);
}
.logo-ring-wrapper {
  position: relative;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 6px 20px rgba(2, 66, 165, 0.18);
}
.rotating-logo-ring {
  position: absolute;
  top: -3px;
  left: -3px;
  width: calc(100% + 6px);
  height: calc(100% + 6px);
  border-radius: 50%;
  background: linear-gradient(135deg, #0242a5 0%, #ffffff 50%, #00b4d8 100%);
  z-index: -1;
  animation: spinRing 4s linear infinite;
}
@keyframes spinRing {
  100% { transform: rotate(360deg); }
}
.logo-ring-wrapper img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  z-index: 2;
}
.split-brand-text {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.4px;
}

.split-main-content {
  margin: 0;
}
.split-title {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.6px;
  margin-bottom: 4px;
  text-align: center;
}
.split-subtitle {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 24px;
  text-align: center;
}

.split-form-group {
  margin-bottom: 16px;
}
.split-form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.split-form-control {
  width: 100%;
  padding: 12px 14px;
  font-size: 13px;
  font-family: inherit;
  color: #1e293b;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  outline: none;
  transition: all 0.2s ease;
}
.split-form-control:focus {
  background: #ffffff;
  border-color: #0d9488;
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.15);
}

.split-form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 24px;
  font-size: 12.5px;
}
.remember-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #475569;
  font-weight: 500;
  cursor: pointer;
}
.remember-wrap input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #0d9488;
  cursor: pointer;
}
.forgot-link {
  color: #f43f5e;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}
.forgot-link:hover {
  color: #e11d48;
  text-decoration: underline;
}

.split-actions {
  display: flex;
  gap: 12px;
}
.btn-split-login {
  flex: 1;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  background: #0d9488;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(13, 148, 136, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-split-login:hover {
  background: #0f766e;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.3);
}
.btn-split-create {
  flex: 1;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  color: #475569;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}
.btn-split-create:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #94a3b8;
}

.split-disclaimer {
  position: relative;
  z-index: 5;
  font-size: 11px;
  color: #64748b;
  line-height: 1.5;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(2, 66, 165, 0.1);
  text-align: center;
}

/* Right Illustration Panel with Video Support */
.split-image-panel {
  width: 50%;
  height: 100%;
  position: relative;
  background: #0f172a;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.split-image-panel img,
.split-image-panel video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

/* Center Yellow Floating Circle (Divider Badge) */
.center-circle-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  background: #fbbf24;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(251, 191, 36, 0.4);
  z-index: 15;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 3px solid #ffffff;
}
.center-circle-badge i {
  font-size: 18px;
  color: #78350f;
  margin-left: 2px;
}
.center-circle-badge:hover {
  transform: translate(-50%, -50%) scale(1.1);
  background: #f59e0b;
}

/* Bottom Right Overlay Pill */
.bottom-right-pill {
  position: absolute;
  bottom: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 8px 16px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  z-index: 5;
}
.bottom-right-pill i {
  font-size: 18px;
  color: #0f172a;
  cursor: pointer;
}

/* Responsive Scaling for Laptops, Tablets, and Mobile Phones */
@media (max-width: 1200px) {
  .split-form-panel { padding: 20px 24px; }
  .inner-form-container.glass-effect { padding: 28px 32px; }
}

@media (max-width: 992px) {
  .split-auth-wrapper { height: auto; min-height: 100vh; overflow-y: auto; }
  .split-auth-card { flex-direction: column; height: auto; min-height: 100vh; }
  
  /* Mobile View Activates Spacer Blue Header */
  .mobile-top-header { display: block; }
  .split-brand-enclosed { display: none; }
  
  .split-form-panel { width: 100%; padding: 0 24px 48px; min-height: calc(100vh - 220px); justify-content: flex-start; gap: 24px; background: #e6effc; }
  .inner-form-container.glass-effect { padding: 32px 24px; max-width: 100%; box-shadow: 0 10px 40px rgba(2, 66, 165, 0.1); margin-top: -20px; z-index: 10; }
  .split-image-panel { display: none; }
  .center-circle-badge { display: none; }
  
  .split-main-content { margin: 0; padding: 0; }
  .split-title { font-size: 24px; letter-spacing: -0.5px; text-align: center; }
  .split-subtitle { font-size: 13px; margin-bottom: 24px; text-align: center; }
  .split-form-label { font-size: 11px; }
  .split-form-control { padding: 12px 14px; font-size: 13px; }
  .split-actions { flex-direction: column; gap: 12px; }
  .btn-split-login, .btn-split-create { padding: 12px 18px; font-size: 14px; }
  .split-disclaimer { font-size: 11px; margin-top: 20px; text-align: center; }
}

@media (max-width: 576px) {
  .split-form-panel { padding: 0 16px 32px; }
  .inner-form-container.glass-effect { padding: 24px 18px; }
  .split-title { font-size: 22px; }
  .mobile-brand-name { font-size: 20px; }
}


/* ==========================================================================
   MASTER DATA MANAGEMENT UI
   ========================================================================== */
.master-container {
  display: flex;
  flex: 1;
  height: calc(100vh - 62px);
  overflow: hidden;
  margin-top: 0;
  animation: fadeUp 0.4s ease-out;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Sidebar Navigation */
.master-sidebar {
  width: 250px;
  background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  gap: 6px;
  z-index: 10;
  box-shadow: var(--shadow-sm);
  overflow-y: auto;
}
.sidebar-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  padding: 0 16px;
  margin-bottom: 10px;
  margin-top: 10px;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-sub);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-item i {
  font-size: 18px;
  transition: transform 0.3s ease;
}
.sidebar-item:hover {
  color: #1a56b0;
  background: rgba(26, 86, 176, 0.08);
  transform: translateX(4px);
}
.sidebar-item.active {
  color: #ffffff;
  background: #1a56b0;
  box-shadow: 0 4px 12px rgba(26, 86, 176, 0.3);
}
.sidebar-item.active i {
  color: #ffffff;
}

/* Main Content Area */
.master-content {
  flex: 1;
  padding: 24px 28px 60px;
  overflow-y: auto;
  background: #f0f4fa;
}

.tab-pane {
  display: none;
  animation: fadeInPane 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.tab-pane.active {
  display: block;
}

@keyframes fadeInPane {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.master-header-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  background: #ffffff;
  padding: 18px 24px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.master-page-title {
  font-size: 22px;
  font-weight: 800;
  color: #0f1f3d;
  letter-spacing: -0.4px;
}
.master-page-sub {
  font-size: 13px;
  color: #4a6080;
  margin-top: 4px;
}

.action-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}
.search-box {
  position: relative;
  width: 280px;
}
.search-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #92a5be;
}
.search-input {
  width: 100%;
  padding: 10px 16px 10px 38px;
  font-size: 13px;
  border: 1px solid #dde5f2;
  border-radius: 8px;
  background: #ffffff;
  color: #0f1f3d;
  outline: none;
  transition: all 0.2s ease;
}
.search-input:focus {
  border-color: #1a56b0;
  box-shadow: 0 0 0 3px rgba(26, 86, 176, 0.15);
}

.btn-add {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  background: #1a56b0;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(26, 86, 176, 0.25);
  transition: all 0.2s ease;
}
.btn-add:hover {
  background: #15458c;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(26, 86, 176, 0.35);
}

/* Beautiful Table Card */
.table-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(15, 31, 61, 0.05);
  border: 1px solid #dde5f2;
  overflow: hidden;
  animation: slideUpFade 0.5s ease-out;
}

/* Glassmorphism Tilt utility */
.glass-tilt {
  background: rgba(255, 255, 255, 0.65) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(255, 255, 255, 0.8) !important;
  box-shadow: 0 15px 50px rgba(2, 66, 165, 0.12) !important;
  transform-style: preserve-3d;
  transition: box-shadow 0.3s ease;
}
.glass-tilt:hover {
  box-shadow: 0 20px 60px rgba(2, 66, 165, 0.2) !important;
}

@keyframes slideUpFade {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

.table-responsive {
  overflow-x: auto;
  width: 100%;
}

.master-tbl {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.master-tbl th {
  padding: 16px 20px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #4a6080;
  background-color: #f8fafc;
  border-bottom: 1px solid #dde5f2;
}
.master-tbl td {
  padding: 16px 20px;
  font-size: 13px;
  color: #0f1f3d;
  border-bottom: 1px solid #dde5f2;
  vertical-align: middle;
}
.master-tbl tbody tr {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease;
  position: relative;
}
.master-tbl tbody tr:hover {
  background-color: #fcfdfd;
  transform: translateY(-3px) scale(1.002);
  box-shadow: inset 0 3px 0 #1a56b0, 0 8px 24px rgba(15, 31, 61, 0.12);
  z-index: 2;
}
.master-tbl tbody tr:last-child td {
  border-bottom: none;
}

.empty-tbl {
  text-align: center;
  padding: 60px !important;
  color: #92a5be;
  font-size: 14px;
}

/* Status Badges */
.badge {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.badge-active {
  background-color: var(--success-light);
  color: var(--success);
}
.badge-inactive {
  background-color: var(--danger-light);
  color: var(--danger);
}

/* Table Action Buttons */
.tbl-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-action {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-sub);
}
.btn-action.edit:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-2px);
}
.btn-action.delete:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: var(--danger-light);
  transform: translateY(-2px);
}
.btn-action.key:hover {
  color: var(--warning);
  border-color: var(--warning);
  background: var(--warning-light);
  transform: translateY(-2px);
}

/* ==========================================================================
   MODAL DIALOGS
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.3);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeInBackdrop 0.2s ease-out;
}
.modal-backdrop.show {
  display: flex;
}

@keyframes fadeInBackdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
  border: 2px solid var(--primary);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalScaleUp 0.3s cubic-bezier(0.2, 1, 0.4, 1);
  max-height: 90vh;
}

@keyframes modalScaleUp {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 24px 32px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
}
.modal-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
}
.btn-close {
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.btn-close:hover {
  color: var(--danger);
  transform: rotate(90deg);
}

.modal-card form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.modal-body {
  padding: 32px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.modal-footer {
  padding: 20px 32px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  background: transparent;
}

.btn-secondary {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  color: #dc2626;
  background: #ffffff;
  border: 1px solid #f87171;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.btn-secondary:hover {
  background: #fef2f2;
  border-color: #dc2626;
  color: #b91c1c;
}

.btn-submit {
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 700;
  color: #0f1f3d;
  background: var(--secondary);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(255, 184, 0, 0.25);
}
.btn-submit:hover {
  background: var(--secondary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 184, 0, 0.35);
}

.form-select {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text-main);
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  outline: none;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

/* ════════════════════════════════════════════════════════════
    LYCON GLOBAL ANIMATED LOADER (SPLASH SCREEN)
════════════════════════════════════════════════════════════ */
.lycon-global-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  opacity: 1;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.lycon-global-loader.hide {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
}

.loader-logo-container {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

/* Rotating outer glowing glass ring */
.loader-glow-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-top-color: #fbbf24;
  border-bottom-color: #00c6ff;
  border-radius: 50%;
  animation: spin-ring 1.5s linear infinite;
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.4);
}

/* Pulsing inner logo */
.loader-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  animation: pulse-logo 1.5s ease-in-out infinite alternate;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
}

.loader-text-main {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 1px;
  margin-bottom: 8px;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  animation: fade-text 1.5s ease-in-out infinite alternate;
  text-align: center;
}

.loader-text-sub {
  font-size: 13px;
  font-weight: 700;
  color: #fbbf24;
  letter-spacing: 3px;
  text-transform: uppercase;
  animation: fade-text 1.5s ease-in-out infinite alternate 0.3s;
  text-align: center;
}

.loader-progress-bar {
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 99px;
  margin-top: 32px;
  overflow: hidden;
  position: relative;
}

.loader-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, #fbbf24, #f5bc2f);
  border-radius: 99px;
  animation: load-bar 1.5s ease-in-out infinite alternate;
}

@keyframes spin-ring {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse-logo {
  0% { transform: scale(0.92); }
  100% { transform: scale(1.08); }
}

@keyframes fade-text {
  0% { opacity: 0.75; }
  100% { opacity: 1; }
}

@keyframes load-bar {
  0% { left: 0%; width: 30%; }
  100% { left: 70%; width: 30%; }
}

/* ════════════════════════════════════════════════════════════
    CUSTOM FILE UPLOAD STYLE
════════════════════════════════════════════════════════════ */
.file-label-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #f0f4fa;
  border: 1px dashed #b8ccec;
  color: #1a56b0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
  width: 100%;
  justify-content: center;
}
.file-label-btn:hover {
  background: #e8f0fb;
  border-color: #1a56b0;
  transform: translateY(-1px);
}
.file-label-btn i {
  font-size: 16px;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ════════════════════════════════════════════════════════════
    MOBILE / HP RESPONSIVE ENHANCEMENTS
════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Loader adjustments */
  .loader-logo-container {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
  }
  .loader-logo {
    width: 52px;
    height: 52px;
  }
  .loader-text-main {
    font-size: 20px;
    margin-bottom: 4px;
  }
  .loader-text-sub {
    font-size: 11px;
    letter-spacing: 2px;
  }
  .loader-progress-bar {
    width: 150px;
    height: 3px;
    margin-top: 24px;
  }

  /* General structural adjustments for Mobile (HP) */
  .topbar {
    padding: 8px 14px !important;
  }
  .tb-brand .tb-name {
    display: none !important;
  }
  .tb-brand .tb-sub {
    font-size: 11px !important;
  }
  .tb-logo img {
    width: 32px !important;
    height: 32px !important;
  }
  
  /* Master Container Mobile Adjustments */
  .master-container {
    flex-direction: column !important;
    height: auto !important;
    overflow-y: auto !important;
  }
  .master-sidebar {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    padding: 10px 14px;
    border-right: none;
    border-bottom: 1px solid #dde5f2;
    white-space: nowrap;
    gap: 12px;
  }
  .sidebar-title {
    display: none;
  }
  .sidebar-item {
    padding: 8px 14px;
    font-size: 13px;
    gap: 8px;
    border-radius: 20px;
    flex-shrink: 0;
  }
  .master-content {
    padding: 16px 14px 40px !important;
    flex: none;
  }
  .master-header-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
  }
  .action-bar {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .search-box {
    width: 100%;
  }

  /* Other mobile adjustments */
  .page-body, .main-content {
    padding: 14px !important;
    height: auto !important;
    overflow-y: auto !important;
  }
  .page-heading {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 12px;
  }
  .heading-actions {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    gap: 8px;
  }
  .field-grid.cols-2, .field-grid.cols-3, .field-grid.cols-4 {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .sec-card {
    margin-bottom: 16px !important;
    border-radius: 12px !important;
  }
  .sec-hdr {
    padding: 12px 16px !important;
    flex-direction: column;
    align-items: flex-start !important;
    gap: 10px;
  }
  .sec-body {
    padding: 16px !important;
  }
  .tbl-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .dyn-table th, .dyn-table td {
    padding: 10px !important;
    font-size: 13px !important;
  }
  .btn, .btn-save, .btn-cancel, .btn-add-row {
    padding: 8px 14px !important;
    font-size: 13px !important;
  }
}

/* Navbar button hover expansion override */
.tb-actions .nav-btn {
    max-width: 34px;
    height: 34px;
    padding: 0 !important;
    justify-content: flex-start;
    overflow: hidden;
    gap: 0 !important;
    transition: max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.tb-actions .nav-btn i {
    font-size: 15px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tb-actions .nav-btn .btn-label {
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: max-width 0.3s ease, opacity 0.3s ease;
}

.tb-actions .nav-btn:hover {
    max-width: 250px;
    padding-right: 14px !important;
}

.tb-actions .nav-btn:hover .btn-label {
    max-width: 200px;
    opacity: 1;
}

/* Mobile adjustments for nav buttons */
@media (max-width: 640px) {
    .topbar {
        height: auto !important;
        min-height: var(--tb-h);
        padding: 12px 14px !important;
        flex-wrap: wrap;
        gap: 12px !important;
    }
    .tb-brand {
        min-width: 0;
    }
    .tb-actions {
        gap: 6px !important;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    .tb-actions .nav-btn {
        max-width: 34px !important;
        height: 34px !important;
    }
    .tb-actions .nav-btn i {
        width: 34px !important;
        height: 34px !important;
        font-size: 14px !important;
    }
    .tb-actions .nav-btn:hover {
        max-width: 34px !important;
        padding-right: 0 !important;
    }
    .tb-actions .nav-btn:hover .btn-label {
        opacity: 0 !important;
        max-width: 0 !important;
    }
}
