:root {
  --primary-color: #0071e3;
  --secondary-color: #06c;
  --background-color: #fbfbfd;
  --surface-color: #ffffff;
  --text-color: #1d1d1f;
  --text-secondary: #86868b;
  --border-color: #d2d2d7;
  --error-color: #ff3b30;
  --success-color: #34c759;
  --warning-color: #ff9500;
}

html,
body {
  /* height: 100%; */
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Icons",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 100%;
  padding: 15px;
  margin: 0 auto;
  overflow-x: hidden;
}

@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}

.login-form {
  background: var(--surface-color);
  border-radius: 18px;
  padding: 2.5rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  max-width: 400px;
  margin: 4rem auto;
}

.login-form h1 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-align: center;
}

input {
  width: 90%;
  padding: 12px 16px;
  margin: 8px 0;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-size: 17px;
  transition: all 0.2s ease;
}

input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}

button {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
}

.dashboard-nav {
  background: var(--surface-color);
  padding: 1.5rem;
  border-radius: 24px;
  margin-bottom: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 1rem;
  z-index: 100;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.dashboard-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1rem;
}

.dashboard-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.dashboard-nav a:hover {
  color: var(--primary-color);
  background: rgba(0, 113, 227, 0.08);
  transform: translateY(-1px);
}

.dashboard-nav a.active {
  color: var(--primary-color);
  background: rgba(0, 113, 227, 0.1);
  font-weight: 600;
}

.dashboard-nav a.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: var(--primary-color);
  border-radius: 0 4px 4px 0;
}

.dashboard-content {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem;
  border-radius: 12px;
  /* Hide scrollbar while allowing scrolling */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  /* Prevent content overflow */
  position: relative;
}

.table {
  width: 100%;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1rem 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  table-layout: fixed;
}

.table th,
.table td {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 150px; /* Ensure minimum width for cells */
}

.table tr:hover td {
  background: rgba(0, 113, 227, 0.02);
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  letter-spacing: 0.3px;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
  background: #6c757d;
  width: auto;
}

.card {
  background: var(--surface-color);
  border-radius: 24px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  margin: 0 0 1rem 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1rem;
}

.card-header h2 {
  font-size: 24px;
  font-weight: 600;
  margin: 0;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 14px;
  border-radius: 8px;
}

.d-flex {
  display: flex;
}

.justify-content-between {
  justify-content: space-between;
}

.align-items-center {
  align-items: center;
}

.text-center {
  text-align: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: linear-gradient(135deg, var(--primary-color), #0056b3);
  color: white;
  border-radius: 24px;
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0) 100%
  );
}

.stat-card h3 {
  margin: 0;
  font-size: 2rem;
}

.notes-list {
  max-height: 300px;
  overflow-y: auto;
}

.note-item {
  padding: 1rem;
  border-bottom: 1px solid #eee;
}

.follow-up-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #eee;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  max-width: 100px;
  text-overflow: ellipsis;
  overflow: hidden;
}

.status-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-pending {
  background: #fff7ed;
  color: var(--warning-color);
}

.status-approved {
  background: #f0f9f0;
  color: var(--success-color);
}

.status-paid {
  background: #f0f9f0;
  color: var(--success-color);
}

.status-rejected {
  background: #fef2f2;
  color: var(--error-color);
}

.nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0 1.5rem 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0;
}

.burger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: 1rem;
}

.burger-menu span {
  width: 30px;
  height: 2px;
  background: var(--text-color);
  border-radius: 10px;
  transition: all 0.3s linear;
  position: relative;
  transform-origin: 1px;
}

.burger-menu.active span:first-child {
  transform: rotate(45deg);
}

.burger-menu.active span:nth-child(2) {
  opacity: 0;
}

.burger-menu.active span:last-child {
  transform: rotate(-45deg);
}

.nav-menu {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.nav-menu.hidden {
  display: none;
}

/* Override hidden class for desktop */
@media (min-width: 769px) {
  .nav-menu.hidden {
    display: flex !important;
  }
}

.hide-mobile {
  display: flex;
}

@media (max-width: 768px) {
  .hide-mobile {
    display: none;
  }

  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface-color);
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 18px 18px;
    z-index: 1000;
  }

  .nav-menu.show {
    display: flex !important;
  }

  .dashboard-nav {
    position: relative;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  .login-form {
    margin: 1rem;
  }

  .burger-menu {
    display: flex;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface-color);
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 18px 18px;
    z-index: 1000;
  }

  .nav-menu.show {
    display: flex;
  }

  .nav-menu.hidden {
    display: none;
  }

  .dashboard-nav {
    position: relative;
  }

  .nav-menu.show {
    display: flex;
  }

  .nav-menu.hidden {
    display: none;
  }

  .dashboard-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .dashboard-nav li {
    width: 100%;
  }

  .dashboard-nav a {
    display: block;
    padding: 1rem;
    border-radius: 0;
    border-bottom: 1px solid var(--border-color);
  }

  .dashboard-nav a:hover {
    background: var(--background-color);
  }

  [dir="rtl"] .burger-menu {
    margin-left: 0;
    margin-right: 1rem;
  }

  .dashboard-nav {
    position: relative;
  }

  .card-header {
    flex-direction: column;
    gap: 1rem;
  }

  .card-header .btn {
    width: 100%;
  }

  .table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
  }
}

/* RTL Support */
[dir="rtl"] {
  text-align: right;
}

/* Mobile Responsive Updates */
@media (max-width: 768px) {
  .container {
    padding: 10px;
    width: 100%;
  }

  .dashboard-nav {
    padding: 1rem;
  }

  .dashboard-nav ul {
    flex-direction: column;
    gap: 0.5rem;
  }

  .dashboard-nav a {
    display: block;
    padding: 0.75rem 1rem;
  }

  .card {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 12px;
  }

  .card-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table th,
  .table td {
    min-width: 120px;
    white-space: nowrap;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .btn {
    width: 100%;
    margin-bottom: 0.5rem;
    justify-content: center;
  }

  .btn-sm {
    width: auto;
    margin-bottom: 0;
  }

  .login-form {
    margin: 1rem;
    padding: 1.5rem;
  }

  input,
  textarea {
    font-size: 16px; /* Prevents iOS zoom on focus */
  }

  /* Stack action buttons on mobile */
  td .btn + .btn {
    margin-top: 0.5rem;
  }

  /* Make form groups stack nicely */
  .form-group {
    margin-bottom: 1rem;
  }

  /* Improve table readability on mobile */
  .table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Additional mobile optimizations */
@media (max-width: 480px) {
  .card-header h2 {
    font-size: 20px;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-card h3 {
    font-size: 1.5rem;
  }

  /* Stack action buttons vertically on very small screens */
  td .btn {
    display: block;
    width: 100%;
  }
}

/* Touch device optimizations */
@media (hover: none) {
  .btn:hover {
    transform: none;
  }

  .dashboard-nav a:hover {
    background: none;
  }

  /* Increase touch targets */
  .btn,
  .dashboard-nav a,
  input[type="checkbox"],
  input[type="radio"] {
    min-height: 44px;
    min-width: 44px;
  }
}

.form {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
}

.form-group {
  margin-bottom: 2rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.btn-danger {
  background: var(--error-color);
  color: white;
}

.form-group input,
.form-group textarea {
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

.card .form button {
  max-width: 200px;
  margin: 1rem auto;
  display: block;
}

@media (max-width: 768px) {
  .form {
    padding: 0;
  }

  .card .form button {
    max-width: 100%;
  }
}

.lang-switcher {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

[dir="rtl"] .lang-switcher {
  right: auto;
  left: 20px;
}

.lang-switcher .btn {
  background: var(--surface-color);
  color: var(--text-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
}

@media (max-width: 768px) {
  .lang-switcher {
    top: 10px;
    right: 10px;
  }

  [dir="rtl"] .lang-switcher {
    right: auto;
    left: 10px;
  }
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
    width: 100%;
  }

  .nav-menu.show {
    display: block;
  }

  .dashboard-nav h1 {
    font-size: 20px;
  }
}

@media (min-width: 769px) {
  .burger-menu {
    display: none;
  }

  .nav-menu {
    display: flex !important;
  }
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  border-radius: 12px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 113, 227, 0.2);
  border: none;
  text-decoration: none;
  width: auto;
}

.btn-primary:hover {
  background: var(--secondary-color);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 113, 227, 0.3);
}

.btn-primary::before {
  content: "+";
  font-size: 1.2em;
  line-height: 1;
}

.card-header .btn-primary {
  background: var(--primary-color);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
  .btn-primary {
    width: 100%;
    justify-content: center;
  }
}

/* Public Quotation View Styles */
.public-view {
  background-color: var(--background-color);
  padding: 2rem 0;
}

.quotation-public-view {
  max-width: 900px;
  margin: 0 auto;
}

.quotation-public-view .header-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.quotation-public-view .created-date {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.card-section {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.card-section:last-child {
  border-bottom: none;
}

.card-section h3 {
  margin: 0 0 1rem 0;
  color: var(--text-color);
  font-size: 1.2rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.info-item label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.quotation-items {
  margin: 0;
}

.service-name {
  font-weight: 500;
}

.action-buttons {
  text-align: center;
  background: var(--background-color);
}

.action-buttons .notice {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

.button-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.button-group form {
  flex: 0 1 200px;
}

.expiry-notice {
  text-align: center;
  color: var(--text-secondary);
  background: var(--background-color);
  font-size: 0.9rem;
}

/* Mobile Responsive Updates */
@media (max-width: 768px) {
  .public-view {
    padding: 1rem 0;
  }

  .button-group {
    flex-direction: column;
  }

  .button-group form {
    flex: auto;
  }

  .quotation-items th {
    white-space: nowrap;
  }
}

.dashboard-nav {
  background: var(--surface-color);
  padding: 1.5rem;
  border-radius: 18px;
  margin-bottom: 2rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0 1.5rem 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.nav-header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0;
}

.dashboard-nav ul {
  display: flex;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
  flex-wrap: wrap;
}

.dashboard-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.dashboard-nav a:hover {
  color: var(--text-color);
  background: var(--background-color);
}

.dashboard-nav a.active {
  color: var(--primary-color);
  background: rgba(0, 113, 227, 0.1);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 0.5rem 1rem;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  background: var(--background-color);
  border-color: var(--primary-color);
}

@media (max-width: 768px) {
  .dashboard-nav {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .nav-header {
    padding: 0.5rem 0 1rem 0;
  }

  .nav-menu {
    margin-top: 1rem;
  }

  .dashboard-nav ul {
    flex-direction: column;
    gap: 0.25rem;
  }

  .dashboard-nav a {
    padding: 1rem;
    border-radius: 8px;
    width: 100%;
    justify-content: space-between;
  }

  .dashboard-nav a::after {
    content: "›";
    font-size: 1.2em;
    opacity: 0.5;
  }

  .dashboard-nav a:hover::after {
    opacity: 1;
    transform: translateX(4px);
  }
}

/* Enhanced Select/Dropdown Styling */
select.form-control {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8.825L1.175 4 2.238 2.938 6 6.7l3.763-3.762L10.825 4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
  padding-right: 2.5rem;
  cursor: pointer;
  border: 2px solid var(--border-color);
  transition: all 0.2s ease;
}

[dir="rtl"] select.form-control {
  background-position: left 1rem center;
  padding-right: 1rem;
  padding-left: 2.5rem;
}

select.form-control:hover {
  border-color: var(--primary-color);
  background-color: var(--background-color);
}

select.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
  outline: none;
}

select.form-control option {
  padding: 12px;
  font-size: 15px;
  background: var(--surface-color);
  color: var(--text-color);
}

select.form-control option:hover {
  background: var(--background-color);
}

/* Service Selection Styling */
.service-select {
  font-weight: 500;
  color: var(--text-color);
}

.service-select option[value=""] {
  color: var(--text-secondary);
  font-style: italic;
}

/* Client Selection Styling */
.client-select select {
  font-size: 1.1rem;
  padding: 14px 18px;
  margin-bottom: 1rem;
  background-color: var(--surface-color);
  border-radius: 12px;
}

.client-select select:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Dropdown Groups */
.form-group select {
  background-color: var(--surface-color);
  border-radius: 12px;
  height: auto;
  min-height: 48px;
  max-width: 100%;
}

/* Mobile Optimization */
@media (max-width: 768px) {
  select.form-control {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 12px 16px;
  }

  .client-select select {
    font-size: 16px;
    padding: 12px 16px;
  }
}

/* Touch Device Optimization */
@media (hover: none) {
  select.form-control,
  .client-select select {
    min-height: 48px;
  }
}

/* Enhanced Service Select Styling */
.service-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1em;
  padding: 1rem;
  font-size: 0.95rem;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  color: var(--text-color);
  background-color: var(--surface-color);
}

.service-select:hover {
  border-color: var(--primary-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.service-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.service-select option {
  padding: 12px;
  font-size: 0.95rem;
  background: var(--surface-color);
}

.service-select option:first-child {
  font-style: italic;
  color: var (--text-secondary);
}

.service-select option:not(:first-child) {
  border-bottom: 1px solid var(--border-color);
  padding: 12px;
}

.service-select option:hover {
  background-color: var(--background-color);
}

[dir="rtl"] .service-select {
  background-position: left 1rem center;
  padding-right: 1rem;
  padding-left: 3rem;
}

@media (max-width: 768px) {
  .service-select {
    font-size: 16px;
    padding: 0.875rem;
  }
}

/* Modal fixes */
body.modal-open {
  padding-right: var(--scrollbar-width, 17px) !important;
  height: 100vh !important;
  position: fixed !important;
  width: 100% !important;
}

/* Base modal styles */
.modal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  max-height: 90vh;
  width: 90%;
  max-width: 500px;
  background: var(--surface-color);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  overflow-y: auto;
}

.modal.show .modal-content {
  transform: translateY(0);
  opacity: 1;
}

/* Agreement checkboxes styling */
.agreement-checks {
  margin: 2rem 0;
  padding: 1rem;
  border-radius: 12px;
  background: var(--background-color);
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: 8px;
  background: var(--surface-color);
  transition: all 0.2s ease;
}

.checkbox-label:hover {
  background: var(--hover-color);
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 0.2rem;
  accent-color: var(--primary-color);
}

.checkbox-label a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  position: relative;
}

.checkbox-label a:hover {
  text-decoration: underline;
}

/* RTL Support */
[dir="rtl"] .checkbox-label {
  text-align: right;
}

/* Remove body scroll lock */
body.modal-open {
  overflow-y: auto !important;
  padding-right: 0 !important;
}

/* Modal variations */
.modal-large .modal-content {
  max-width: 800px;
}

.modal-full .modal-content {
  max-width: 1200px;
}

/* Modal actions */
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
}

/* RTL support */
[dir="rtl"] .modal-actions {
  flex-direction: row-reverse;
}

/* Media query for small screens */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    padding: 1.5rem;
    margin: 1rem;
  }
}

/* Policy modal specific styles */
.policy-content {
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
}

/* RTL Support */
[dir="rtl"] .modal-actions {
  flex-direction: row-reverse;
}

/* Fix for policy content modal */
.policy-content {
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
}

/* Contract Styles */
.contract-view {
  max-width: 900px;
  margin: 2rem auto;
  padding: 2rem;
}

.contract-content {
  white-space: pre-line;
  line-height: 1.6;
  font-size: 1.1rem;
  page-break-inside: avoid;
}

/* Contract Header */
.contract-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.contract-logo {
  text-align: left;
  margin: 0;
  padding: 0;
}

.contract-logo img {
  max-width: 150px;
  height: auto;
}

/* Timer Styles */
.timer-wrapper {
  text-align: center;
  margin-bottom: 1rem;
}

.timer {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.timer.warning {
  color: var(--warning-color);
}

.timer.danger {
  color: var(--error-color);
}

.timer-notice {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* RTL Support */
[dir="rtl"] {
  .contract-content {
    text-align: right;
  }

  .contract-logo {
    text-align: right;
  }

  .modal-actions {
    flex-direction: row-reverse;
  }
}

/* Print Styles */
@media print {
  @page {
    size: A4;
    margin: 15mm;
  }

  body {
    margin: 0;
    padding: 0;
    background: none;
  }

  .contract-view {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: none !important;
  }

  .contract-content {
    font-size: 11pt !important;
    line-height: 1.4 !important;
  }

  .contract-logo {
    margin-bottom: 0.5rem;
    padding: 0;
  }

  /* Hide non-printable elements */
  .action-buttons,
  .lang-switcher,
  .modal,
  .btn {
    display: none !important;
  }
}

/* Mobile Menu Styles */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface-color);
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 18px 18px;
    z-index: 1000;
  }

  .nav-menu.hidden {
    display: none !important;
  }

  .nav-menu:not(.hidden) {
    display: flex;
    flex-direction: column;
  }

  .dashboard-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .dashboard-nav a {
    padding: 1rem;
    width: 100%;
  }
}

/* Desktop Menu Styles */
@media (min-width: 769px) {
  .nav-menu {
    display: flex !important;
  }

  .nav-menu.hidden {
    display: flex !important;
  }
}
