/* CSS Variables for Typography */
:root {
  --font-primary: "DIN_Regular", "Roboto", Arial, Verdana, Geneva, sans-serif;
  --font-mono: "DIN_Regular", "Roboto", Arial, Verdana, Geneva, sans-serif;
  --font-size-xs: 0.75rem;     /* 12px */
  --font-size-sm: 0.875rem;    /* 14px */
  --font-size-base: 1rem;      /* 16px */
  --font-size-lg: 1.125rem;    /* 18px */
  --font-size-xl: 1.25rem;     /* 20px */
  --font-size-2xl: 1.5rem;     /* 24px */
  --font-size-3xl: 1.875rem;   /* 30px */
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
}

/* Common Styles for All Pages */
body {
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  background: #111;
  color: #fff;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Navigation Bar Styles */
.navbar {
  background: #1a1a1a;
  border-bottom: 2px solid #333;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  height: 60px;
}

.navbar-brand {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: #ffffff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.025em;
}

.navbar-brand:hover {
  color: #ffffff;
}

.navbar-brand::before {
  content: "STARLINK";
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.02em;
}

.navbar-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 15px;
}

.navbar-item {
  position: relative;
}

.navbar-link {
  color: #ccc;
  text-decoration: none;
  padding: 20px 0;
  display: block;
  transition: color 0.3s ease;
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
  letter-spacing: 0.025em;
}

.navbar-link:hover {
  color: #ffffff;
}

.navbar-link.active {
  color: #ffffff;
  border-bottom: 2px solid #ffffff;
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

/* Container and Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 15px;
}

/* Page Header Styles */
.page-header {
  text-align: center;
  margin-bottom: 5px;
}

.page-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  margin-bottom: 10px;
  color: #ffffff;
  line-height: var(--line-height-tight);
  letter-spacing: -0.025em;
}

.page-subtitle {
  color: #888;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  letter-spacing: -0.025em;

}

h1 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
}

h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-semibold);
}

h3 {
  font-size: var(--font-size-xl);
}

h4 {
  font-size: var(--font-size-lg);
}

h5 {
  font-size: var(--font-size-base);
}

h6 {
  font-size: var(--font-size-sm);
}

/* Dashboard Card Styles */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.card {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.7);
}

.card.hidden {
  display: none;
}

.label { 
  font-size: var(--font-size-xs); 
  font-weight: var(--font-weight-medium);
  color: #888; 

  margin-bottom: 2px;
  letter-spacing: 0.05em;
}

.value { 
  font-weight: var(--font-weight-medium); 
  font-size: var(--font-size-sm);
  color: #fff; 
  margin-bottom: 8px; 
  word-wrap: break-word;
  line-height: var(--line-height-normal);
}

.status { 
  font-weight: var(--font-weight-semibold); 
  font-size: var(--font-size-sm);
  display: flex;
  align-items: center;
  gap: 5px;
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 3px;
}

.status.active {
  color: hsl(125, 100%, 50%);
}

.status.active .status-dot {
  background-color: hsl(118, 100%, 50%);
  animation: blink 1s infinite;
}

.status.pause {
  color: #ff0000;
}

.status.pause .status-dot {
  background-color: #ff0000;
}

.status.standby {
  color: #ffa500;
}

.status.standby .status-dot {
  background-color: #ffa500;
}

.status.suspended {
  color: #ff0000;
}

.status.suspended .status-dot {
  background-color: #ff0000;
}

/* Blinking animation for ACTIVE status */
@keyframes blink {
  0% { 
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

hr { 
  border: none; 
  border-top: 1px solid #333; 
  margin: 10px 0; 
}

/* Search Container Styles */
.search-container {
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.search-box {
  padding: 12px;
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 5px;
  color: #fff;
  font-size: 14px;
  flex: 1;
  min-width: 250px;
  max-width: 400px;
}

.search-box::placeholder {
  font-size: 11px;
  color: #666;
}

/* Ensure placeholder styling applies to all screen sizes */
@media (max-width: 768px) {
  .search-box::placeholder {
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .search-box::placeholder {
    font-size: 9px;
  }
}

.search-box:focus {
  outline: none;
  border-color: #555;
  box-shadow: 0 0 5px rgba(85, 85, 85, 0.5);
}

.search-info {
  color: #888;
  font-size: 12px;
  white-space: nowrap;
}

/* Billing Page Styles */
.filters {
  
  padding: 20px;
  border-radius: 10px;
  
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.total-unpaid-container {
  text-align: center;
  background: #2a2a2a;
  padding: 20px;
  border-radius: 8px;
  border: 2px solid #555;
  min-width: 300px;
}

.total-unpaid-label {
  font-size: 14px;
  color: #ccc;
  text-transform: uppercase;
  margin-bottom: 10px;
  font-weight: bold;
}

.total-unpaid-amount {
  font-size: 32px;
  color: #fff;
  font-weight: bold;
  margin-bottom: 5px;
}

.total-unpaid-count {
  font-size: 12px;
  color: #888;

}

.billing-table {
  background: #202020;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  padding: 0px 0px 35px 0px;
}

.table-header {
  
  padding: 15px 20px;
  border-bottom: 2px solid #333;
}

.table-title {
  font-size: 18px;
  font-weight: bold;
  color: #ffffff;
}

.table-responsive {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #333;
  font-family: var(--font-primary);
  line-height: var(--line-height-normal);
}

th {
  background: #2a2a2a;
  color: #ffffff;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-xs);

  letter-spacing: 0.05em;
}

td {
  background: #1e1e1e;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-normal);
}

tr:hover td {
  background: #252525;
}

.status-badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: var(--font-size-xs);
  font-family: var(--font-primary);

  letter-spacing: 0.05em;
  color: #dd0000;
  border: 1px solid #dd0000;
  line-height: var(--line-height-tight);
}

.amount {
  font-family: var(--font-mono);
  color: #fff;
  line-height: var(--line-height-normal);
}

.loading {
  text-align: center;
  padding: 40px;
  color: #888;
  font-family: var(--font-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
}

.no-data {
  text-align: center;
  padding: 40px;
  color: #888;
  font-family: var(--font-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .navbar-container {
    padding: 0 15px;
    height: 50px;
  }
  
  .navbar-brand {
    font-size: 20px;
  }
  
  .navbar-brand::before {
    font-size: 24px;
  }
  
  .navbar-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #1a1a1a;
    flex-direction: column;
    border-top: 1px solid #333;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
  }
  
  .navbar-menu.active {
    display: flex;
  }
  
  .navbar-link {
    padding: 15px 20px;
    border-bottom: 1px solid #333;
  }
  
  .navbar-link:last-child {
    border-bottom: none;
  }
  
  .navbar-toggle {
    display: block;
  }

  /* Dashboard mobile styles */
  body {
    margin: 10px;
  }
  
  .container {
    padding: 0 10px;
  }
  
  h2 {
    font-size: 20px;
    margin-bottom: 20px;
  }
  
  .grid {
    grid-template-columns: 1fr !important;
    gap: 15px;
  }
  
  .card {
    padding: 12px;
    width: 100%;
    box-sizing: border-box;
  }
  
  .search-container {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 15px;
  }
  
  .search-box {
    min-width: unset;
    max-width: unset;
    width: 100%;
    font-size: 16px;
    box-sizing: border-box;
  }
  
  .search-info {
    text-align: center;
    white-space: normal;
  }
  
  .label {
    font-size: 11px;
  }
  
  .value {
    font-size: 14px;
    margin-bottom: 6px;
  }

  /* Billing mobile styles */
  .total-unpaid-container {
    min-width: unset;
    width: 100%;
  }
  
  .total-unpaid-amount {
    font-size: 28px;
  }
  
  .table-responsive {
    font-size: 14px;
  }
  
}

/* Small Mobile Styles */
@media (max-width: 480px) {
  body {
    margin: 5px;
  }
  
  .container {
    padding: 0 5px;
  }
  
  h2 {
    font-size: 18px;
  }
  
  .card {
    padding: 10px;
  }
  
  .grid {
    gap: 10px;
    grid-template-columns: 1fr !important;
  }
  
  .search-box {
    padding: 10px;
  }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* Large Desktop Styles */
@media (min-width: 1200px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  }
}

/* Form Styles for Login, Profile Pages */
.form-container {
  max-width: 500px;
  margin: 50px auto;
  background: #1e1e1e;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.form-title {
  text-align: center;
  margin-bottom: 30px;
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-semibold);
  color: #ffffff;
  line-height: var(--line-height-tight);
  letter-spacing: -0.025em;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  color: #ccc;
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
}

.form-input {
  width: 100%;
  padding: 12px;
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 5px;
  color: #fff;
  font-size: var(--font-size-sm);
  font-family: var(--font-primary);
  font-weight: var(--font-weight-normal);
  box-sizing: border-box;
  line-height: var(--line-height-normal);
}

.form-input:focus {
  outline: none;
  border-color: #666;
  box-shadow: 0 0 5px rgba(102, 102, 102, 0.5);
}

.form-button {
  width: 100%;
  padding: 12px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: var(--font-size-base);
  font-family: var(--font-primary);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: background-color 0.3s ease;
  line-height: var(--line-height-normal);
}

.form-button:hover {
  background: #0056b3;
}

.form-button.danger {
  background: #dc3545;
}

.form-button.danger:hover {
  background: #c82333;
}

.form-link {
  display: block;
  text-align: center;
  margin-top: 20px;
  color: #007bff;
  text-decoration: none;
}

.form-link:hover {
  text-decoration: underline;
}

/* Profile Form Sections */
.form-section {
  background: #2a2a2a;
  border-radius: 8px;
  padding: 20px;
  margin: 25px 0;
  border: 1px solid #444;
}

.form-section-title {
  font-size: 16px;
  color: #fff;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #007bff;
  font-weight: 600;
}

.social-icon {
  display: inline-block;
  width: 20px;
  font-size: 14px;
  margin-right: 5px;
}

.form-row .form-group {
  margin-bottom: 15px;
}

/* Admin Settings Styles */
.admin-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

.admin-section {
  background: #1e1e1e;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  border: 1px solid #333;
}

.admin-title {
  font-size: 20px;
  margin-bottom: 20px;
  color: #ffffff;
  border-bottom: 2px solid #333;
  padding-bottom: 10px;
}

.user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.user-card {
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 20px;
}

.user-info {
  margin-bottom: 15px;
}

.user-name {
  font-weight: bold;
  color: #fff;
  font-size: 16px;
}

.user-details {
  color: #ccc;
  font-size: 14px;
  margin-top: 5px;
}

.mapping-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.mapping-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mapping-label {
  font-size: 11px;
  color: #888;

  font-weight: bold;
}

.mapping-input {
  padding: 6px 8px;
  background: #1e1e1e;
  border: 1px solid #555;
  border-radius: 3px;
  color: #fff;
  font-size: 12px;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.save-button {
  margin-top: 15px;
  padding: 8px 16px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
}

.save-button:hover {
  background: #218838;
}

/* Alert Messages */
.alert {
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 5px;
  font-weight: bold;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

/* Mobile Responsive Styles Enhancement */
@media (max-width: 768px) {
  .navbar-container {
    padding: 0 15px;
    height: 50px;
  }
  
  .navbar-brand {
    font-size: var(--font-size-xl);
  }
  
  .navbar-brand::before {
    font-size: var(--font-size-2xl);
  }
  
  .navbar-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #1a1a1a;
    flex-direction: column;
    border-top: 1px solid #333;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    width: 200px;
  }
  
  .navbar-menu.active {
    display: flex;
  }
  
  .navbar-link {
    padding: 15px 20px;
    border-bottom: 1px solid #333;
  }
  
  .navbar-link:last-child {
    border-bottom: none;
  }
  
  .navbar-toggle {
    display: block;
  }

  /* Dashboard mobile styles */
  body {
    margin: 10px;
  }
  
  .container {
    padding: 0 10px;
  }
  
  h2 {
    font-size: 20px;
    margin-bottom: 20px;
  }
  
  .grid {
    grid-template-columns: 1fr !important;
    gap: 15px;
  }
  
  .card {
    padding: 12px;
    width: 100%;
    box-sizing: border-box;
  }
  
  .search-container {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 15px;
  }
  
  .search-box {
    min-width: unset;
    max-width: unset;
    width: 100%;
    font-size: 16px;
    box-sizing: border-box;
  }
  
  .search-info {
    text-align: center;
    white-space: normal;
  }
  
  .label {
    font-size: 11px;
  }
  
  .value {
    font-size: 14px;
    margin-bottom: 6px;
  }

  /* Billing mobile styles */
  .filters {
    
    gap: 15px;
    padding: 15px;
  }
  
  .total-unpaid-container {
    min-width: unset;
    width: 100%;
    padding: 15px;
  }
  
  .total-unpaid-amount {
    font-size: 28px;
  }
  
  .table-responsive {
    font-size: 12px;
  }
  
  th, td {
    padding: 6px 8px;
    font-size: 12px;
  }
  
  
  .table-header {
    padding: 0px 15px;
  }
  
  .table-title {
    font-size: 16px;
  }

  /* Form mobile styles */
  .form-container {
    margin: 20px auto;
    padding: 20px;
    max-width: none;
    margin-left: 10px;
    margin-right: 10px;
  }
  
  .form-title {
    font-size: 20px;
    margin-bottom: 20px;
  }
  
  .form-input {
    padding: 14px;
    font-size: 16px;
  }
  
  .form-button {
    padding: 14px;
    font-size: 16px;
  }
  
  /* Profile form mobile styles */
  .form-section {
    padding: 15px;
    margin: 20px 0;
  }
  
  .form-section-title {
    font-size: 14px;
    margin-bottom: 15px;
  }
  
  .social-icon {
    font-size: 12px;
  }

  /* Admin mobile styles */
  .admin-container {
    padding: 10px;
  }
  
  .admin-section {
    padding: 15px;
    margin-bottom: 15px;
  }
  
  .admin-title {
    font-size: 18px;
    margin-bottom: 15px;
  }
  
  .user-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .user-card {
    padding: 15px;
  }
  
  .mapping-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .mapping-input {
    padding: 8px 6px;
    font-size: 14px;
  }
  
  .mapping-label {
    font-size: 10px;
  }
  
  .save-button {
    padding: 10px 16px;
    font-size: 14px;
  }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
  body {
    margin: 5px;
  }
  
  .container {
    padding: 0 5px;
  }
  
  h2 {
    font-size: 18px;
  }
  
  .card {
    padding: 10px;
  }
  
  .grid {
    gap: 10px;
    grid-template-columns: 1fr !important;
  }
  
  .search-box {
    padding: 10px;
  }
  
  /* Form small mobile */
  .form-container {
    margin: 10px;
    padding: 15px;
  }
  
  .form-title {
    font-size: 18px;
  }
  
  /* Admin small mobile */
  .admin-container {
    padding: 5px;
  }
  
  .admin-section {
    padding: 12px;
  }
  
  .user-card {
    padding: 12px;
  }
  
  .mapping-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  
  .mapping-input {
    padding: 10px 8px;
  }
  

  
  .table-responsive {
    font-size: 11px;
  }
  
  .total-unpaid-amount {
    font-size: 24px;
  }
  
  /* Status badges mobile */
  .status-badge {
    padding: 2px 6px;
    font-size: 10px;
  }
  
  /* Enhanced mobile navigation */
  .navbar-menu {
    width: 200px;
    min-width: 150px;
  }
  
  .navbar-link {
    font-size: 14px;
  }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .user-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .mapping-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Large Desktop Styles */
@media (min-width: 1200px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  }
  
  .user-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }
}

/* Extra Large Desktop Styles */
@media (min-width: 1600px) {
  .container {
    max-width: 1400px;
  }
  
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 25px;
  }
  
  .admin-container {
    max-width: 1200px;
  }
}

/* Login Page Specific Styles */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  padding: 20px;
}

.demo-info {
  margin-top: 20px;
  padding: 15px;
  background: #2a2a2a;
  border-radius: 5px;
  font-size: var(--font-size-xs);
  font-family: var(--font-primary);
  color: #888;
  line-height: var(--line-height-normal);
}

.demo-info h4 {
  color: #ccc;
  margin-bottom: 10px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

/* Profile Page Specific Styles */
.profile-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-help {
  font-size: var(--font-size-xs);
  font-family: var(--font-primary);
  color: #888;
  margin-top: 5px;
  line-height: var(--line-height-normal);
}

/* Admin Settings Specific Styles */
.admin-section {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 30px;
}

.section-title {
  color: #fff;
  font-size: 18px;
  margin-bottom: 15px;
  border-bottom: 2px solid #333;
  padding-bottom: 10px;
}

.section-subtitle {
  color: #fff;
  font-size: 16px;
  margin-bottom: 10px;
  border-bottom: 2px solid #007bff;
  padding-bottom: 5px;
}

.form-row {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

/* Admin form specific improvements */
.admin-section .form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

.admin-section .form-label {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #aaa;
  display: block;
}

.admin-section .form-input {
  width: 100%;
  padding: 12px 15px;
  font-size: 14px;
  border-radius: 5px;
  transition: all 0.2s ease;
  background: #2a2a2a;
  border: 1px solid #444;
  color: #fff;
  box-sizing: border-box;
  height: 48px;
  line-height: 1.4;
  font-family: var(--font-primary);
}

.admin-section .form-input:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
  outline: none;
}

/* Ensure consistent sizing for all specific form fields */
.admin-section input[name="username"],
.admin-section input[name="password"], 
.admin-section input[name="full_name"],
.admin-section input[name="email"],
.admin-section input[name="google_sheet_id"],
.admin-section input[name="data_range"] {
  width: 100%;
  height: 48px;
  padding: 12px 15px;
  font-size: 14px;
  border-radius: 5px;
  background: #2a2a2a;
  border: 1px solid #444;
  color: #fff;
  box-sizing: border-box;
  line-height: 1.4;
  font-family: var(--font-primary);
  transition: all 0.2s ease;
}

.admin-section input[name="username"]:focus,
.admin-section input[name="password"]:focus,
.admin-section input[name="full_name"]:focus,
.admin-section input[name="email"]:focus,
.admin-section input[name="google_sheet_id"]:focus,
.admin-section input[name="data_range"]:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
  outline: none;
}

.form-group.auto {
  flex: 0 0 auto;
}

/* Admin button improvements */
.admin-section .btn {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.admin-section .btn-success {
  background: linear-gradient(135deg, #28a745, #20c997);
  border: none;
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.admin-section .btn-success:hover {
  background: linear-gradient(135deg, #218838, #1e7e34);
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.4);
  transform: translateY(-1px);
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: #007bff;
  color: #fff;
}

.btn-success {
  background: #28a745;
  color: #fff;
}

.btn-danger {
  background: #dc3545;
  color: #fff;
}

.btn-warning {
  background: #ffc107;
  color: #000;
}

.btn-secondary {
  background: #6c757d;
  color: #fff;
}

.btn-secondary:hover {
  background: #5a6268;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

/* Modal styles */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #1e1e1e;
  padding: 30px;
  border-radius: 10px;
  max-width: 800px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid #444;
}

.modal-header {
  color: #fff;
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 600;
}

.modal-actions {
  margin-top: 20px;
  text-align: right;
}

.modal-actions .btn {
  margin-left: 10px;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.users-table th,
.users-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #333;
}

.users-table th {
  background: #2a2a2a;
  color: #fff;
  font-weight: bold;
  font-size: 12px;

}

.users-table td {
  background: #1e1e1e;
  color: #ccc;
}

.users-table tr:hover td {
  background: #252525;
}

.status-active {
  color: #28a745;
  font-weight: bold;
}

.status-inactive {
  color: #dc3545;
  font-weight: bold;
}

/* Admin message styles */
.success-message {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-weight: 500;
}

.error-message {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-weight: 500;
}

.sheet-id {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "DIN_Regular", "Roboto", Arial, Verdana, Geneva, sans-serif;
  font-size: 12px;
}

.data-range {
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "DIN_Regular", "Roboto", Arial, Verdana, Geneva, sans-serif;
  font-size: 12px;
  background: #2a4a2a;
  color: #90ee90;
  padding: 2px 6px;
  border-radius: 3px;
}

/* Admin section title improvements */
.admin-section .section-title {
  font-size: 18px;
  margin-bottom: 18px;
  color: #ffffff;
  border-bottom: 2px solid #007bff;
  padding-bottom: 8px;
  font-weight: 600;
}

.admin-section .section-subtitle {
  font-size: 14px;
  color: #fff;
  margin-bottom: 12px;
  font-weight: 500;
}

/* Form organization improvements */
.admin-section small {
  font-size: 10px;
  color: #888;
  margin-top: 4px;
  display: block;
}

.column-mapping-section {
  background: #2a2a2a;
  padding: 15px;
  border-radius: 6px;
  margin: 15px 0;
  border: 1px solid #444;
}

.column-mapping-section h3 {
  font-size: 14px;
  margin-bottom: 10px;
  color: #fff;
}

.column-mapping-section p {
  margin-bottom: 12px;
}

.column-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.column-item {
  background: #1e1e1e;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #444;
}

.column-item .form-label {
  font-size: 9px;
  color: #bbb;
  margin-bottom: 4px;
}

.column-item .form-input {
  width: 100%;
  padding: 6px;
  font-size: 12px;
  text-align: center;
  font-weight: bold;
}

.quick-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Mobile specific adjustments for admin */
@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
    gap: 0;
    margin-bottom: 15px;
  }
  
  .form-row .form-group {
    margin-bottom: 15px;
  }
  
  .admin-section {
    padding: 15px;
    margin-bottom: 15px;
  }
  
  .admin-section .section-title {
    font-size: 16px;
    margin-bottom: 15px;
  }
  
  /* Consistent mobile form field styling */
  .admin-section .form-input,
  .admin-section input[name="username"],
  .admin-section input[name="password"],
  .admin-section input[name="full_name"],
  .admin-section input[name="email"],
  .admin-section input[name="google_sheet_id"],
  .admin-section input[name="data_range"] {
    height: 48px;
    padding: 12px 15px;
    font-size: 16px;
    border-radius: 6px;
  }
  
  .admin-section .form-label {
    font-size: 12px;
    margin-bottom: 6px;
  }
  
  .column-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  /* User Management Table Mobile Styles */
  .users-table {
    font-size: 11px;
    border-collapse: collapse;
  }
  
  .users-table th,
  .users-table td {
    padding: 6px 4px;
    text-align: left;
    word-wrap: break-word;
  }
  
  .users-table th {
    background: #333;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  
  /* Hide less important columns on mobile */
  .users-table th:nth-child(1),
  .users-table td:nth-child(1) {
    display: none; /* Hide ID column */
  }
  
  .users-table th:nth-child(6),
  .users-table td:nth-child(6) {
    display: none; /* Hide Data Range column */
  }
  
  /* Responsive table cells */
  .sheet-id {
    max-width: 80px;
    font-size: 9px;
  }
  
  .data-range {
    max-width: 60px;
    font-size: 9px;
  }
  
  .quick-actions {
    flex-direction: column;
    gap: 4px;
  }
  
  .quick-actions .btn {
    font-size: 10px;
    padding: 4px 8px;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .login-container {
    padding: 10px;
  }
  
  .form-container {
    margin: 0;
    padding: 20px;
  }
  
  .demo-info {
    font-size: 11px;
    padding: 12px;
  }
  
  .demo-info h4 {
    font-size: 12px;
  }
  
  .profile-form {
    margin: 0 5px;
  }
  
  .form-help {
    font-size: 11px;
  }
  
  .column-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  
  /* Enhanced mobile styles for smaller screens */
  .admin-section {
    padding: 12px;
    margin-bottom: 12px;
  }
  
  .admin-section .section-title {
    font-size: 14px;
    margin-bottom: 12px;
  }
  
  /* Maintain consistent sizing even on small screens */
  .admin-section .form-input,
  .admin-section input[name="username"],
  .admin-section input[name="password"],
  .admin-section input[name="full_name"],
  .admin-section input[name="email"],
  .admin-section input[name="google_sheet_id"],
  .admin-section input[name="data_range"] {
    height: 48px;
    padding: 12px 15px;
    font-size: 16px;
  }
  
  .admin-section .form-label {
    font-size: 11px;
    margin-bottom: 5px;
  }
  
  /* Ultra-compact user table for small screens */
  .users-table {
    font-size: 9px;
  }
  
  .users-table th,
  .users-table td {
    padding: 4px 2px;
  }
  
  /* Hide more columns on very small screens */
  .users-table th:nth-child(4),
  .users-table td:nth-child(4) {
    display: none; /* Hide Email column */
  }
  
  .users-table th:nth-child(5),
  .users-table td:nth-child(5) {
    max-width: 60px;
    font-size: 8px;
  }
  
  .quick-actions .btn {
    font-size: 9px;
    padding: 3px 6px;
  }
  
  /* Simple table scroll for very small screens */
  .admin-section {
    overflow-x: auto;
  }
  
  .users-table {
    min-width: 600px;
    font-size: 10px;
  }
  
  .users-table th,
  .users-table td {
    padding: 6px 4px;
    min-width: 60px;
  }
  
  /* Show scrollable hint */
  .admin-section:after {
    content: "← Swipe to see more →";
    display: block;
    text-align: center;
    font-size: 9px;
    color: #666;
    margin-top: 5px;
  }
  
  /* Modal mobile styles */
  .modal-content {
    padding: 20px;
    margin: 10px;
  }
  
  .modal-header {
    font-size: 16px;
  }
  
  .modal-actions {
    text-align: center;
  }
  
  .modal-actions .btn {
    margin: 5px;
    width: 100px;
  }
}

/* Grid/Cards Layout for User Management */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.user-card {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.user-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
  border-color: #555;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #333;
}

.user-info h3.user-name {
  font-family: var(--font-primary);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: #fff;
  margin: 0 0 5px 0;
  line-height: var(--line-height-tight);
}

.user-info .username {
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  color: #888;
  margin: 0 0 5px 0;
  font-weight: var(--font-weight-normal);
}

/* Online Status Indicator */
.online-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  margin-top: 5px;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-online .status-indicator {
  background-color: #28a745;
  box-shadow: 0 0 8px rgba(40, 167, 69, 0.5);
  animation: pulse-online 2s infinite;
}

.status-recent .status-indicator {
  background-color: #ffc107;
  box-shadow: 0 0 6px rgba(255, 193, 7, 0.4);
}

.status-today .status-indicator {
  background-color: #17a2b8;
  box-shadow: 0 0 4px rgba(23, 162, 184, 0.3);
}

.status-offline .status-indicator {
  background-color: #6c757d;
  box-shadow: none;
}

.status-online .status-text {
  color: #28a745;
}

.status-recent .status-text {
  color: #ffc107;
}

.status-today .status-text {
  color: #17a2b8;
}

.status-offline .status-text {
  color: #6c757d;
}

/* Pulse animation for online users */
@keyframes pulse-online {
  0% {
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.5);
  }
  50% {
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.8);
  }
  100% {
    box-shadow: 0 0 8px rgba(40, 167, 69, 0.5);
  }
}

.user-status {
  flex-shrink: 0;
}

.card-body {
  margin-bottom: 20px;
}

.user-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.detail-label {
  font-family: var(--font-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: #aaa;
  min-width: 80px;
}

.detail-value {
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  color: #fff;
  text-align: right;
  flex: 1;
  margin-left: 10px;
  word-break: break-all;
}

.detail-value.sheet-id {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  align-items: center;
}

.card-actions .btn {
  font-family: var(--font-primary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1;
  min-width: 90px;
  justify-content: center;
  white-space: nowrap;
}

.card-actions .icon {
  font-size: 12px;
}

.card-actions form {
  flex: 1;
  min-width: 90px;
}

.card-actions form .btn {
  width: 100%;
}

/* Status badges in cards */
.user-card .status-active,
.user-card .status-inactive {
  font-family: var(--font-primary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  padding: 4px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Mobile responsiveness for cards */
@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .user-card {
    padding: 15px;
  }
  
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .user-status {
    align-self: flex-end;
  }
  
  .detail-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  
  .detail-value {
    text-align: left;
    margin-left: 0;
    word-break: break-word;
  }
  
  .card-actions {
    flex-direction: column;
  }
  
  .card-actions .btn,
  .card-actions form,
  .card-actions form .btn {
    width: 100%;
    min-width: unset;
  }
  
  /* Mobile online status adjustments */
  .online-status {
    font-size: 10px;
    gap: 4px;
  }
  
  .status-indicator {
    width: 6px;
    height: 6px;
  }
}

/* Password Input with Toggle Eye Icon */
.password-input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-container .form-input {
  padding-right: 45px;
  flex: 1;
}

.password-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.password-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.password-toggle:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.15);
}

.eye-icon {
  font-size: 18px;
  user-select: none;
  line-height: 1;
}

/* Remember Me Checkbox Styles */
.checkbox-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
}

.form-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #4CAF50;
  cursor: pointer;
  margin: 0;
}

.checkbox-label {
  font-family: var(--font-primary);
  font-size: var(--font-size-sm);
  color: #ccc;
  cursor: pointer;
  user-select: none;
  margin: 0;
}

.checkbox-label:hover {
  color: #fff;
}

/* Custom checkbox styling for better cross-browser support */
.form-checkbox {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #555;
  border-radius: 3px;
  background-color: transparent;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

.form-checkbox:checked {
  background-color: #4CAF50;
  border-color: #4CAF50;
}

.form-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: -2px;
  left: 2px;
  color: white;
  font-size: 14px;
  font-weight: bold;
  line-height: 1;
}

.form-checkbox:hover {
  border-color: #777;
}

.form-checkbox:checked:hover {
  border-color: #45a049;
  background-color: #45a049;
}

/* Mobile responsive adjustments for login form */
@media (max-width: 480px) {
  .password-toggle {
    right: 10px;
  }
  
  .eye-icon {
    font-size: 16px;
  }
  
  .form-checkbox {
    width: 16px;
    height: 16px;
  }
  
  .checkbox-label {
    font-size: var(--font-size-xs);
  }
  
  .form-checkbox:checked::after {
    font-size: 12px;
    left: 1px;
  }
}

@media (max-width: 480px) {
  .grid {
    gap: 10px;
  }
  
  .user-card {
    padding: 12px;
  }
  
  .user-info h3.user-name {
    font-size: var(--font-size-base);
  }
  
  .detail-label,
  .detail-value {
    font-size: var(--font-size-xs);
  }
}
