/* CSS Variables and Base Styles for HMS Modern UI */
:root {
  --primary: #FF8C00;
  --primary-hover: #FF5F00;
  --secondary: #64748b;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --radius: 12px;
  --accent: #FFC300;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] {
  --bg: #0f172a;
  --card: #1e293b;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --border: #334155;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3);
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
}

html,
body {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Layout */
.app {
  display: grid;
  grid-template-columns: 280px 1fr;
  grid-template-rows: 72px 1fr;
  grid-template-areas:
    "sidebar topbar"
    "sidebar main";
  min-height: 100vh;
}

.sidebar {
  grid-area: sidebar;
  background: var(--card);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  z-index: 50;
}

.sidebar.collapsed {
  width: 88px;
}

.sidebar.expanded {
  width: 280px;
}

.topbar {
  grid-area: topbar;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 40;
}

.main {
  grid-area: main;
  padding: 32px 40px;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

@media (max-width: 1200px) {
  .app {
    grid-template-columns: 88px 1fr;
  }
}

@media (max-width: 768px) {
  .app {
    grid-template-columns: 1fr;
    grid-template-areas:
      "topbar"
      "main";
  }

  .sidebar {
    position: fixed;
    left: -280px;
    width: 280px;
    transition: left 0.3s ease;
  }

  .sidebar.open {
    left: 0;
  }

  .main {
    padding: 24px;
  }

  .topbar {
    padding: 0 16px;
  }
}

/* Sidebar Styling */
.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px;
  font-weight: 800;
  font-size: 20px;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.sidebar .menu {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.menu-section {
  padding: 16px 16px 8px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 500;
  transition: all 0.2s ease;
}

.menu a:hover {
  background: rgba(255, 140, 0, 0.05);
  color: var(--primary);
  transform: translateX(4px);
}

.menu a.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(255, 140, 0, 0.25);
}

.menu a span[data-feather] {
  width: 18px;
  height: 18px;
}

/* Topbar */
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  min-width: 280px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  border: none;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-body {
  padding: 16px;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.kpi {
  padding: 16px;
}

.kpi .value {
  font-size: 28px;
  font-weight: 700;
}

.kpi .label {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1024px) {
  .kpis {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .kpis {
    grid-template-columns: 1fr;
  }

  .search {
    display: none;
  }
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.table th {
  color: var(--muted);
  font-weight: 600;
}

.table tr:hover {
  background: rgba(0, 0, 0, 0.03);
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="password"],
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 10px;
  outline: none;
  transition: box-shadow 120ms ease, border-color 120ms ease;
}

input:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(119, 124, 109, 0.15);
}

/* Override general input rules for login form inputs */
.login-form .input-field,
.input-wrapper .input-field {
  padding-left: 52px !important;
}

/* Auth form styling */
.auth-card input[type="email"],
.auth-card input[type="password"] {
  border: 2px solid var(--border);
  background: #f8f9fa;
  transition: all 0.3s ease;
}

.auth-card input[type="email"]:focus,
.auth-card input[type="password"]:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(119, 124, 109, 0.1);
}

.auth-card .btn {
  background: var(--primary);
  border: 2px solid var(--primary);
  font-weight: 600;
  transition: all 0.3s ease;
}

.auth-card .btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(119, 124, 109, 0.2);
}

/* Alert Messages */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-success {
  background: rgba(40, 167, 69, 0.1);
  border-color: rgba(40, 167, 69, 0.2);
  color: #155724;
}

.alert-danger {
  background: rgba(220, 53, 69, 0.1);
  border-color: rgba(220, 53, 69, 0.2);
  color: #721c24;
}

.alert i {
  font-size: 16px;
}

/* Form Text */
.form-text {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

/* Secure Login Branding */
.secure-branding {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 24px;
}

.secure-branding p {
  font-size: 12px;
  margin: 0;
  color: var(--muted);
}

.secure-branding i {
  color: var(--primary);
  margin-right: 4px;
}

.secure-branding strong {
  color: var(--primary);
}

/* Utilities */
.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-8 {
  gap: 8px;
}

.gap-12 {
  gap: 12px;
}

.gap-16 {
  gap: 16px;
}

.mt-16 {
  margin-top: 16px;
}

.mb-16 {
  margin-bottom: 16px;
}

.text-muted {
  color: var(--muted);
}

.grid {
  display: grid;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* ============================================
   MODERN GLASSMORPHISM LOGIN PAGE
   ============================================ */

/* Auth Container - Full Page Background with Cinematic Gradient */
.auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at top left, rgba(255, 212, 0, 0.4) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(255, 95, 0, 0.3) 0%, transparent 50%),
    linear-gradient(135deg, #fffcf5 0%, #fff9e0 15%, #fff0b3 35%, #ffd400 55%, #ffc300 75%, #ff8c00 100%);
  background-size: 100% 100%, 100% 100%, 400% 400%;
  animation: gradientShift 20s ease infinite, ambientPulse 8s ease-in-out infinite;
  perspective: 1000px;
  transform-style: preserve-3d;
  box-sizing: border-box;
}

@keyframes ambientPulse {

  0%,
  100% {
    filter: brightness(1) contrast(1);
  }

  50% {
    filter: brightness(1.05) contrast(1.02);
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* Login Container with Depth of Field */
.login-container {
  position: relative;
  width: 100%;
  max-width: 480px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: visible;
  opacity: 1;
  transform-style: preserve-3d;
  filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.15));
  margin: 0 auto;
}

/* Animated Background Blobs */
.bg-blur-elements {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: blobFloat 20s ease-in-out infinite;
}

.bg-blob-1 {
  width: 500px;
  height: 500px;
  background: linear-gradient(135deg, #FFD400 0%, #FFC300 100%);
  top: -200px;
  left: -200px;
  animation-delay: 0s;
}

.bg-blob-2 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, #FF8C00 0%, #FF5F00 100%);
  bottom: -150px;
  right: -150px;
  animation-delay: 7s;
}

.bg-blob-3 {
  width: 350px;
  height: 350px;
  background: linear-gradient(135deg, #FFC300 0%, #FFD400 100%);
  top: 50%;
  right: -100px;
  animation-delay: 14s;
}

.bg-blob-4 {
  width: 450px;
  height: 450px;
  background: linear-gradient(135deg, rgba(255, 212, 0, 0.6) 0%, rgba(255, 140, 0, 0.4) 100%);
  bottom: 20%;
  left: 10%;
  animation-delay: 10s;
  filter: blur(100px);
}

@keyframes blobFloat {

  0%,
  100% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }

  33% {
    transform: translate(30px, -30px) scale(1.1) rotate(5deg);
  }

  66% {
    transform: translate(-20px, 20px) scale(0.9) rotate(-5deg);
  }
}

/* Ambient Lighting Spots */
.ambient-lighting {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.light-spot {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  animation: lightFloat 12s ease-in-out infinite;
  mix-blend-mode: screen;
}

.light-spot-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 140, 0, 0.8) 0%, transparent 70%);
  top: -200px;
  left: -200px;
  animation-delay: 0s;
}

.light-spot-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 212, 0, 0.7) 0%, transparent 70%);
  bottom: -150px;
  right: -150px;
  animation-delay: 4s;
}

.light-spot-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 95, 0, 0.6) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 8s;
}

@keyframes lightFloat {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.15;
  }

  50% {
    transform: translate(50px, -50px) scale(1.2);
    opacity: 0.25;
  }
}

/* Glass Card - Main Login Container with Neumorphism + Glassmorphism Fusion */
.login-card {
  position: relative;
  width: 100%;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 28px;
  box-shadow:
    /* Neumorphic shadows */
    20px 20px 60px rgba(0, 0, 0, 0.08),
    -20px -20px 60px rgba(255, 255, 255, 0.6),
    /* Glassmorphic depth */
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.08),
    /* Inner glow */
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -1px 0 rgba(255, 255, 255, 0.3),
    /* Soft neon glow */
    0 0 0 1px rgba(255, 140, 0, 0.1),
    0 0 40px rgba(255, 140, 0, 0.05);
  overflow: hidden;
  animation: cardFadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1), cardFloat 6s ease-in-out infinite;
  display: block;
  visibility: visible;
  opacity: 1;
  min-height: 400px;
  transform-style: preserve-3d;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
  transform: translateY(-2px) rotateX(1deg);
  box-shadow:
    25px 25px 70px rgba(0, 0, 0, 0.1),
    -25px -25px 70px rgba(255, 255, 255, 0.7),
    0 12px 40px rgba(0, 0, 0, 0.15),
    0 0 60px rgba(255, 140, 0, 0.1);
}

@keyframes cardFloat {

  0%,
  100% {
    transform: translateY(0) rotateX(0deg);
  }

  50% {
    transform: translateY(-5px) rotateX(0.5deg);
  }
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(30px)) {
  .login-card {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(220, 220, 220, 0.4);
  }
}

/* Glass Reflection Overlay */
.glass-reflection {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg,
      rgba(255, 255, 255, 0.3) 0%,
      rgba(255, 255, 255, 0.1) 50%,
      transparent 100%);
  border-radius: 28px 28px 0 0;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: overlay;
  animation: reflectionShimmer 4s ease-in-out infinite;
}

@keyframes reflectionShimmer {

  0%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }

  50% {
    opacity: 0.5;
    transform: translateY(10px);
  }
}

/* Glowing Edge Effects */
.glow-edge {
  position: absolute;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.login-card:hover .glow-edge {
  opacity: 1;
}

.glow-edge-top {
  top: -2px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(255, 140, 0, 0.6) 50%,
      transparent 100%);
  box-shadow: 0 0 20px rgba(255, 140, 0, 0.4);
  animation: glowPulse 2s ease-in-out infinite;
}

.glow-edge-bottom {
  bottom: -2px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(255, 212, 0, 0.5) 50%,
      transparent 100%);
  box-shadow: 0 0 20px rgba(255, 212, 0, 0.3);
  animation: glowPulse 2s ease-in-out infinite 1s;
}

.glow-edge-left {
  left: -2px;
  top: 20%;
  bottom: 20%;
  width: 2px;
  background: linear-gradient(180deg,
      transparent 0%,
      rgba(156, 175, 136, 0.4) 50%,
      transparent 100%);
  box-shadow: 0 0 20px rgba(156, 175, 136, 0.3);
}

.glow-edge-right {
  right: -2px;
  top: 20%;
  bottom: 20%;
  width: 2px;
  background: linear-gradient(180deg,
      transparent 0%,
      rgba(184, 201, 168, 0.4) 50%,
      transparent 100%);
  box-shadow: 0 0 20px rgba(184, 201, 168, 0.3);
}

@keyframes glowPulse {

  0%,
  100% {
    opacity: 0.4;
    transform: scaleX(1);
  }

  50% {
    opacity: 0.8;
    transform: scaleX(1.1);
  }
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(255, 255, 255, 0.5) 50%,
      transparent 100%);
}

.login-card-inner {
  padding: 48px 40px;
  position: relative;
  z-index: 3;
  display: block;
  visibility: visible;
  opacity: 1;
  transform: translateZ(20px);
}

/* Login Header */
.login-header {
  text-align: center;
  margin-bottom: 40px;
}

.login-title {
  font-size: 36px;
  font-weight: 700;
  color: #2d3a2d;
  margin: 0 0 8px 0;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #2d3a2d 0%, #3a4a3a 50%, #4a5a4a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  visibility: visible;
  position: relative;
  text-shadow: 0 2px 10px rgba(45, 58, 45, 0.1);
  animation: titleGlow 3s ease-in-out infinite;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
}

@keyframes titleGlow {

  0%,
  100% {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
  }

  50% {
    filter: drop-shadow(0 2px 8px rgba(156, 175, 136, 0.2));
  }
}

/* Fallback for browsers that don't support background-clip */
@supports not (-webkit-background-clip: text) {
  .login-title {
    -webkit-text-fill-color: #2d3a2d;
    color: #2d3a2d;
  }
}

.login-subtitle {
  font-size: 15px;
  color: #5a6a5a;
  margin: 0;
  font-weight: 400;
  letter-spacing: 0.2px;
  display: block;
  visibility: visible;
}

/* Login Alert */
.login-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  margin-bottom: 24px;
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.2);
  border-radius: 12px;
  color: #721c24;
  font-size: 14px;
  animation: shake 0.5s ease;
}

.login-alert span[data-feather] {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  75% {
    transform: translateX(5px);
  }
}

/* Login Form */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Modern Input Groups */
.input-group-modern {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.input-label {
  font-size: 13px;
  font-weight: 600;
  color: #3a4a3a;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin-left: 4px;
  display: block;
  visibility: visible;
  cursor: pointer;
  transition: color 0.3s ease;
}

.input-label:hover {
  color: #2d3a2d;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-wrapper-password {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #8a9a8a;
  z-index: 2;
  pointer-events: none;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.input-icon svg {
  width: 18px !important;
  height: 18px !important;
  display: block;
  flex-shrink: 0;
  max-width: 18px;
  max-height: 18px;
}

.input-field {
  width: 100%;
  padding: 14px 16px 14px 52px !important;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px) saturate(180%);
  -webkit-backdrop-filter: blur(15px) saturate(180%);
  border: 1.5px solid rgba(220, 220, 220, 0.6);
  border-radius: 16px;
  font-size: 15px;
  color: #2d3a2d;
  outline: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    /* Neumorphic depth */
    4px 4px 12px rgba(0, 0, 0, 0.06),
    -2px -2px 8px rgba(255, 255, 255, 0.8),
    /* Inner glow */
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(0, 0, 0, 0.02);
  transform: translateZ(0);
  position: relative;
  box-sizing: border-box;
  text-indent: 0 !important;
  margin: 0;
  padding-left: 52px !important;
}

/* Password field with toggle button - proper padding */
.input-field-password {
  padding-right: 48px !important;
  padding-left: 52px !important;
}

.input-wrapper-password .input-field {
  padding-right: 48px !important;
  padding-left: 52px !important;
}

.input-field::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 16px;
  padding: 1.5px;
  background: linear-gradient(135deg, rgba(156, 175, 136, 0.3), rgba(184, 201, 168, 0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.input-field:focus::before {
  opacity: 1;
}

.input-field:focus {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(156, 175, 136, 0.7);
  box-shadow:
    6px 6px 18px rgba(0, 0, 0, 0.08),
    -3px -3px 12px rgba(255, 255, 255, 0.9),
    0 0 0 4px rgba(156, 175, 136, 0.15),
    0 0 20px rgba(156, 175, 136, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  transform: translateY(-1px) translateZ(5px);
}

@supports not (backdrop-filter: blur(15px)) {
  .input-field {
    background: #ffffff;
    border: 1.5px solid #d8d8d8;
  }

  .input-field:focus {
    background: #ffffff;
    border-color: #9caf88;
  }
}

.input-field::placeholder {
  color: #9aaba8;
  font-weight: 400;
  opacity: 0.7;
}

.input-field:hover {
  border-color: rgba(156, 175, 136, 0.4);
  box-shadow:
    5px 5px 14px rgba(0, 0, 0, 0.07),
    -2px -2px 8px rgba(255, 255, 255, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.input-field:focus {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(156, 175, 136, 0.7);
  box-shadow:
    6px 6px 18px rgba(0, 0, 0, 0.08),
    -3px -3px 12px rgba(255, 255, 255, 0.9),
    0 0 0 4px rgba(156, 175, 136, 0.15),
    0 0 20px rgba(156, 175, 136, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  transform: translateY(-1px) translateZ(5px);
  outline: none;
}

.input-field:focus::placeholder {
  opacity: 0.5;
}

.input-field.input-error {
  border-color: rgba(220, 53, 69, 0.6);
  background: rgba(255, 245, 245, 0.95);
  animation: shake 0.4s ease;
}

.input-field.input-error:focus {
  border-color: rgba(220, 53, 69, 0.8);
  box-shadow:
    0 0 0 4px rgba(220, 53, 69, 0.15),
    0 4px 12px rgba(220, 53, 69, 0.1);
}

.input-wrapper:focus-within .input-icon {
  color: #9caf88;
}

.input-wrapper:focus-within .input-icon[data-feather="lock"] {
  color: #9caf88;
}

.input-wrapper:focus-within .input-icon[data-feather="mail"] {
  color: #9caf88;
}

.input-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a9a8a;
  transition: all 0.3s ease;
  z-index: 3;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  outline: none;
}

.input-toggle:hover {
  color: #9caf88;
  background: rgba(156, 175, 136, 0.1);
  transform: translateY(-50%) scale(1.05);
}

.input-toggle:focus {
  color: #9caf88;
  background: rgba(156, 175, 136, 0.15);
  outline: 2px solid rgba(156, 175, 136, 0.3);
  outline-offset: 2px;
}

.input-toggle:active {
  transform: translateY(-50%) scale(0.95);
}

.input-toggle .eye-icon {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  pointer-events: none;
}

/* Login Options */
.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  gap: 16px;
  flex-wrap: wrap;
}

/* Modern Checkbox */
.checkbox-modern {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.checkbox-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(156, 175, 136, 0.5);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    2px 2px 6px rgba(0, 0, 0, 0.08),
    -1px -1px 4px rgba(255, 255, 255, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
  transform: translateZ(0);
}

.checkbox-input:checked+.checkbox-custom {
  background: linear-gradient(135deg, #9caf88 0%, #b8c9a8 100%);
  border-color: #9caf88;
  box-shadow:
    0 0 0 4px rgba(156, 175, 136, 0.15),
    0 2px 8px rgba(156, 175, 136, 0.3);
}

.checkbox-input:checked+.checkbox-custom::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-label {
  font-size: 14px;
  color: #6b7a6b;
  font-weight: 500;
  user-select: none;
}

.forgot-link {
  font-size: 14px;
  color: #9caf88;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.forgot-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #9caf88, #b8c9a8);
  transition: width 0.3s ease;
}

.forgot-link:hover {
  color: #7a9a6a;
}

.forgot-link:hover::after {
  width: 100%;
}

/* Premium Login Button with 3D Effect and Neon Glow */
.login-button {
  width: 100%;
  padding: 0;
  margin-top: 8px;
  border: none;
  border-radius: 16px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.3px;
  background: transparent;
  transform-style: preserve-3d;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.button-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease, opacity 0.6s ease;
  pointer-events: none;
  z-index: 1;
}

.login-button:hover .button-glow {
  width: 300px;
  height: 300px;
  opacity: 0.6;
}

.button-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #9caf88 0%, #b8c9a8 50%, #9caf88 100%);
  background-size: 200% 100%;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow:
    /* Neumorphic depth */
    8px 8px 20px rgba(0, 0, 0, 0.15),
    -4px -4px 10px rgba(255, 255, 255, 0.1),
    /* Neon glow */
    0 0 0 1px rgba(156, 175, 136, 0.3),
    0 0 30px rgba(156, 175, 136, 0.4),
    0 4px 20px rgba(156, 175, 136, 0.3),
    /* Inner highlight */
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateZ(10px);
}

.login-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.3),
      transparent);
  transition: left 0.6s ease;
  z-index: 3;
  border-radius: 16px;
}

.login-button:hover::before {
  left: 100%;
}

.login-button:hover .button-content {
  background-position: 100% 0;
  transform: translateY(-2px) translateZ(15px);
  box-shadow:
    12px 12px 30px rgba(0, 0, 0, 0.2),
    -6px -6px 15px rgba(255, 255, 255, 0.15),
    0 0 0 1px rgba(156, 175, 136, 0.4),
    0 0 50px rgba(156, 175, 136, 0.6),
    0 6px 30px rgba(156, 175, 136, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.login-button:active {
  transform: translateY(0) scale(0.98);
}

.login-button:active .button-content {
  transform: translateY(0) translateZ(5px);
  box-shadow:
    4px 4px 15px rgba(0, 0, 0, 0.2),
    inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.login-button .button-icon {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.login-button:hover .button-icon {
  transform: translateX(6px) scale(1.1);
}

/* Login Footer */
.login-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
}

.footer-text {
  font-size: 12px;
  color: #8a9a8a;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 400;
  letter-spacing: 0.2px;
}

.footer-icon {
  width: 14px;
  height: 14px;
  stroke-width: 2;
  color: #9caf88;
}

.footer-text strong {
  color: #7a9a6a;
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
  .auth {
    padding: 20px;
    min-height: 100vh;
    align-items: center;
  }

  .login-container {
    max-width: 100%;
    width: 100%;
  }

  .login-card-inner {
    padding: 36px 28px;
  }

  .login-title {
    font-size: 30px;
    letter-spacing: -0.8px;
  }

  .login-subtitle {
    font-size: 14px;
  }

  .input-field {
    padding: 12px 14px 12px 46px !important;
    padding-left: 46px !important;
    font-size: 16px;
    /* Prevent zoom on iOS */
    border-radius: 14px;
  }

  .input-field-password {
    padding-right: 44px !important;
    padding-left: 46px !important;
  }

  .input-wrapper-password .input-field {
    padding-right: 44px !important;
    padding-left: 46px !important;
  }

  .input-icon {
    left: 14px;
    width: 16px;
    height: 16px;
  }

  .input-icon svg {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px;
    max-height: 16px;
  }

  .input-toggle {
    right: 10px;
    width: 32px;
    height: 32px;
    padding: 6px;
  }

  .login-button .button-content {
    padding: 14px 20px;
    font-size: 15px;
  }

  .login-options {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .login-card {
    border-radius: 24px;
    min-height: auto;
  }

  .glass-reflection {
    border-radius: 24px 24px 0 0;
  }

  .bg-blob {
    filter: blur(60px);
  }

  .light-spot {
    filter: blur(80px);
  }
}

@media (max-width: 640px) {
  .auth {
    padding: 16px;
  }

  .login-card-inner {
    padding: 32px 24px;
  }

  .login-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .forgot-link {
    align-self: flex-end;
  }
}

@media (max-width: 480px) {
  .auth {
    padding: 12px;
  }

  .login-card-inner {
    padding: 28px 20px;
  }

  .login-title {
    font-size: 26px;
    letter-spacing: -0.6px;
  }

  .login-subtitle {
    font-size: 13px;
  }

  .bg-blob {
    filter: blur(50px);
  }

  .light-spot {
    filter: blur(70px);
    opacity: 0.1;
  }

  .login-card {
    border-radius: 20px;
  }

  .glass-reflection {
    border-radius: 20px 20px 0 0;
  }

  .input-field {
    border-radius: 12px;
    padding: 12px 12px 12px 42px !important;
    padding-left: 42px !important;
    font-size: 16px;
  }

  .input-field-password {
    padding-right: 40px !important;
    padding-left: 42px !important;
  }

  .input-wrapper-password .input-field {
    padding-right: 40px !important;
    padding-left: 42px !important;
  }

  .input-icon {
    left: 12px;
    width: 14px;
    height: 14px;
  }

  .input-icon svg {
    width: 14px !important;
    height: 14px !important;
    max-width: 14px;
    max-height: 14px;
  }

  .input-toggle {
    right: 8px;
    width: 28px;
    height: 28px;
    padding: 4px;
  }

  .input-toggle .eye-icon {
    width: 16px;
    height: 16px;
  }

  .login-button .button-content {
    border-radius: 12px;
    padding: 12px 18px;
    font-size: 14px;
  }

  .login-options {
    gap: 12px;
  }

  .checkbox-label,
  .forgot-link {
    font-size: 13px;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .auth {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 25%, #3a3a3a 50%, #2d2d2d 75%, #1a1a1a 100%);
  }

  .login-card {
    background: rgba(30, 30, 30, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
  }

  .login-title {
    background: linear-gradient(135deg, #e8e8d8 0%, #d4d4c4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .login-subtitle {
    color: #a0a0a0;
  }

  .input-field {
    background: rgba(40, 40, 40, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e8e8d8;
  }

  .input-field:focus {
    background: rgba(50, 50, 50, 0.7);
    border-color: rgba(156, 175, 136, 0.5);
  }

  .checkbox-custom {
    background: rgba(40, 40, 40, 0.5);
    border-color: rgba(156, 175, 136, 0.3);
  }

  .forgot-link {
    color: #b8c9a8;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

  .bg-blob,
  .login-card,
  .input-field,
  .login-button,
  .forgot-link::after,
  .light-spot,
  .glass-reflection,
  .glow-edge,
  .login-title {
    animation: none !important;
    transition: none !important;
  }

  .login-card {
    animation: cardFadeIn 0.3s ease-out;
  }
}

/* Performance optimizations */
.login-card,
.input-field,
.login-button {
  will-change: transform;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Legacy Auth Card Support */
.auth-card {
  max-width: 400px;
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(119, 124, 109, 0.15);
}

/* Dashboard specific styling */
.dashboard-page {
  background: var(--bg);
}

.dashboard-page .kpi {
  background: linear-gradient(135deg, #ffffff 0%, #B7B89F 100%);
  border: 1px solid var(--border);
}

.dashboard-page .kpi .value {
  color: var(--primary);
}

.dashboard-page .card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(119, 124, 109, 0.1);
}

.dashboard-page .btn {
  background: var(--primary);
  border: 1px solid var(--primary);
  transition: all 0.3s ease;
}

.dashboard-page .btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(119, 124, 109, 0.2);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--border);
}

.badge.success {
  background: rgba(34, 197, 94, 0.12);
  color: #166534;
  border-color: rgba(34, 197, 94, 0.35);
}

.badge.warn {
  background: rgba(245, 158, 11, 0.12);
  color: #7c2d12;
  border-color: rgba(245, 158, 11, 0.35);
}

.badge.muted {
  background: rgba(107, 114, 128, 0.12);
  color: #374151;
  border-color: rgba(107, 114, 128, 0.35);
}

/* Custom Scrollbar for Sidebar */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

.sidebar .menu::-webkit-scrollbar {
  width: 6px;
}

.sidebar .menu::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar .menu::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.sidebar .menu::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* Smooth scrolling for sidebar */
.sidebar {
  scroll-behavior: smooth;
}

.sidebar .menu {
  scroll-behavior: smooth;
}

/* Add some padding to ensure last menu item is visible */
.sidebar .menu {
  padding-bottom: 20px;
}

/* Stylish Room Types Navigation Link */
.nav-link-room-types {
  position: relative;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white !important;
  border: 1px solid var(--primary);
  box-shadow: 0 2px 8px rgba(119, 124, 109, 0.2);
  transition: all 0.3s ease;
  margin: 4px 0;
  border-radius: 12px;
  overflow: hidden;
}

.nav-link-room-types::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.nav-link-room-types:hover::before {
  left: 100%;
}

.nav-link-room-types:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(119, 124, 109, 0.3);
  background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
}

.nav-link-room-types.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  box-shadow: 0 4px 16px rgba(119, 124, 109, 0.4);
  border-left: 4px solid white;
}

.nav-link-room-types span[data-feather] {
  color: white;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.nav-link-room-types .nav-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #ff6b6b;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: pulse 2s infinite;
  box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

/* Enhanced hover effects for all nav links */
.menu a:not(.nav-link-room-types) {
  transition: all 0.3s ease;
}

.menu a:not(.nav-link-room-types):hover {
  background: rgba(119, 124, 109, 0.1);
  transform: translateX(4px);
  border-radius: 8px;
}

.menu a:not(.nav-link-room-types).active {
  background: rgba(119, 124, 109, 0.15);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
}

/* Notification System Styles */
.notification-dropdown {
  position: relative;
}

.notification-btn {
  position: relative;
}

.notification-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #dc2626;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--card);
}

.notification-menu {
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 0;
}

.notification-menu .dropdown-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
}

.notification-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease;
  cursor: pointer;
}

.notification-item:hover {
  background: var(--bg);
}

.notification-item.unread {
  background: rgba(119, 124, 109, 0.05);
  border-left: 3px solid var(--primary);
}

.notification-item.read {
  opacity: 0.7;
}

.notification-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notification-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--text);
}

.notification-message {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notification-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.priority-badge {
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
}

.priority-urgent {
  background: #fee2e2;
  color: #dc2626;
}

.priority-high {
  background: #fef3c7;
  color: #d97706;
}

.priority-normal {
  background: #dbeafe;
  color: #2563eb;
}

.priority-low {
  background: #f3f4f6;
  color: #6b7280;
}

/* Notification dropdown animations */
.notification-menu {
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* PWA and Mobile Responsive Styles */
.mobile-device {
  font-size: 16px;
  /* Prevent zoom on iOS */
}

.mobile-device input,
.mobile-device textarea,
.mobile-device select {
  font-size: 16px;
  /* Prevent zoom on iOS */
}

/* Mobile Sidebar */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    z-index: 1050;
    transition: left 0.3s ease;
    background: var(--card-bg);
    border-right: 1px solid var(--border-color);
  }

  .sidebar.show {
    left: 0;
  }

  .sidebar::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .sidebar.show::before {
    opacity: 1;
  }

  .main-content {
    margin-left: 0;
    width: 100%;
  }

  .mobile-sidebar-toggle {
    display: block !important;
  }

  .topbar {
    padding-left: 60px;
  }
}

/* Mobile Navigation */
.mobile-navigation {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.mobile-navigation .btn {
  padding: 8px 12px;
  font-size: 14px;
}

/* Mobile Forms */
.mobile-form {
  padding: 16px;
}

.mobile-form .form-control {
  font-size: 16px;
  padding: 12px 16px;
  border-radius: 8px;
}

.mobile-form .btn {
  padding: 12px 24px;
  font-size: 16px;
  border-radius: 8px;
}

/* Pull to Refresh */
.pull-to-refresh-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--primary-color);
  color: white;
  padding: 12px;
  text-align: center;
  z-index: 9999;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.pull-to-refresh-indicator.show {
  transform: translateY(0);
}

.spinning {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* PWA Install Button */
#installPWA {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 12px 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

#installPWA:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* Mobile Cards */
@media (max-width: 768px) {
  .card {
    margin-bottom: 16px;
    border-radius: 12px;
  }

  .card-body {
    padding: 16px;
  }

  .grid {
    gap: 16px;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Mobile Tables */
@media (max-width: 768px) {
  .table-responsive {
    border-radius: 8px;
    overflow: hidden;
  }

  .table {
    font-size: 14px;
  }

  .table th,
  .table td {
    padding: 8px 12px;
  }
}

/* Mobile Modals */
@media (max-width: 768px) {
  .modal-dialog {
    margin: 16px;
    max-width: calc(100% - 32px);
  }

  .modal-content {
    border-radius: 12px;
  }

  .modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
  }

  .modal-body {
    padding: 20px;
  }

  .modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
  }
}

/* Touch-friendly buttons */
@media (max-width: 768px) {
  .btn {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 20px;
  }

  .btn-sm {
    min-height: 36px;
    min-width: 36px;
    padding: 8px 16px;
  }
}

/* Mobile-specific utilities */
@media (max-width: 768px) {
  .d-mobile-none {
    display: none !important;
  }

  .d-mobile-block {
    display: block !important;
  }

  .text-mobile-center {
    text-align: center !important;
  }

  .mb-mobile-16 {
    margin-bottom: 16px !important;
  }

  .p-mobile-16 {
    padding: 16px !important;
  }
}

/* Landscape orientation */
@media (orientation: landscape) and (max-height: 500px) {
  .topbar {
    padding: 8px 20px;
  }

  .sidebar {
    width: 240px;
  }

  .card-body {
    padding: 12px;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
  .card {
    border-width: 0.5px;
  }

  .btn {
    border-width: 0.5px;
  }
}

/* Dark mode mobile adjustments */
@media (prefers-color-scheme: dark) {
  .mobile-device {
    background: var(--bg-color);
    color: var(--text-color);
  }

  .mobile-navigation .btn {
    background: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-color);
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {

  .sidebar,
  .pull-to-refresh-indicator,
  .card,
  .btn {
    transition: none !important;
  }

  .spinning {
    animation: none !important;
  }
}

/* Focus indicators for mobile */
.mobile-device .btn:focus,
.mobile-device .form-control:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Safe area insets for iOS */
@supports (padding: max(0px)) {
  .mobile-device .topbar {
    padding-top: max(16px, env(safe-area-inset-top));
  }

  .mobile-device .sidebar {
    padding-top: max(16px, env(safe-area-inset-top));
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
}