/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: linear-gradient(120deg, #192653 0%, #232e4d 100%);
  color: white;
  display: flex;
  height: 100vh;
  overflow-y: auto;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 12px 22px;
  text-decoration: none;
  color: #E0E0E0;
  font-size: 15px;
  border-radius: 8px;
  margin: 4px 12px;
  transition: background 0.2s, color 0.2s;
  font-weight: 500;
  gap: 10px;
  position: relative;
}

.menu-item.active .badge {
  background: #ffe066 !important;   /* galben deschis pentru contrast */
  color: #232e4d !important;        /* text închis la culoare pentru lizibilitate */
  box-shadow: 0 2px 8px 0 rgba(255, 224, 102, 0.15);
  border: 1px solid #ffe066;
}

.menu-item .menu-icon {
  font-size: 1.2em;
  margin-right: 8px;
  display: inline-flex;
}
.menu-item:hover {
  background: #232e4d;
  color: #00e6c3;
}
.menu-item.active, .menu-item.selected {
  background: linear-gradient(90deg, #3170d9 0%, #0783a1 100%);
  color: #fff;
}
.bottom-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  padding: 0 12px 18px 12px;
}
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0; right: -100%;
    width: 60%; height: 100%;
    z-index: 1001;
    transition: right 0.3s ease;
  }
  .sidebar.open {
    right: 0;
  }
/* Edit summary fixat sus în modal */
#editSummary {
  margin: unset;
  display: block;
  position: relative;
  z-index: 2;
}

#addSummary {
  margin: unset;
  display: block;
  position: relative;
  z-index: 2;
}
/* Edit modal flex container pentru aliniere orizontală */
.edit-modal-flex,
.add-modal-flex {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 2rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.add-modal-flex > .login-container:first-child {
  width: 100%;
}
.add-modal-flex > #addSummary {
  width: 35%;
  min-width: 220px;
  max-width: 320px;
}
@media (max-width: 900px) {
  .edit-modal-flex,
  .add-modal-flex {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
    max-width: 100vw;
  }
}
}
/* Edit summary modal styles */
.edit-summary-modal {
  min-width: 220px;
  max-width: 260px;
  padding: 1.5rem 1rem 1rem 1rem;
  background: #f7f7f7;
  border-radius: 8px;
  margin-left: 2rem;
  box-shadow: 0 2px 8px #0001;
  align-self: flex-start;
}

/* Edit summary modal list styles - similar to reservation details modal */
.edit-summary-modal ul {
  list-style: none;
  padding: 0.75rem 0.5rem;
  margin: 0;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
}
.edit-summary-modal ul li {
  padding: 0.5em 0.2em;
  border-bottom: 1px solid #f0f0f0;
  color: #232e4d;
  font-size: 1rem;
}
.edit-summary-modal ul li:last-child {
  border-bottom: none;
}

#editSummary h4 {
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
  color: #ffffff;
  font-weight: bold;
  text-align: center;  
}

.App, #main {
  min-height: 100vh;
  background: linear-gradient(120deg, #192653 0%, #232e4d 100%);
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}
/* #frm{
  margin-right: 0.8rem;
} */

/* Sidebar */
#sidebar {
  width: 240px;
  background: #ffffff0d;
  border: 1px solid #ffffff1a;
  color: #E0E0E0;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100vh;
  transition: right 0.3s ease, left 0.3s ease, transform 0.3s;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
  position: relative;
  z-index: 1100;
}

#sidebar h2,
#sidebar .date {
  text-align: center;
  margin: 0 auto 2rem;
  display: block;
}
#sidebar h2 {
  font-size: 1.3rem;
}
#sidebar .date {
  background: #ffffff0d;
  color: #ccc;
  padding: 0.3em 1em;
  border-radius: 4px;
  font-size: 0.9rem;
}
#sidebar button {
  --tw-gradient-from: #3170d9 var(--tw-gradient-from-position, 0%);
  --tw-gradient-to: #0783a1 var(--tw-gradient-to-position, 100%);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
  background-image: linear-gradient(to right, var(--tw-gradient-stops));
  color: white;
  font-weight: bold;
  border: none;
  padding: 0.6em 1em;
  margin: 0.4em 0;
  width: 100%;
  border-radius: 0.5rem;
  cursor: pointer;
  box-shadow: none;
  text-align: center !important;
  transition: background 0.2s, filter 0.2s, transform 0.1s;
}
#sidebar button:hover,
#sidebar button.active {
  filter: brightness(1.15) contrast(1.1);
  transform: scale(1.04);
}
#sidebar #btnLogout {
  background: linear-gradient(135deg, #dc3545, #a71d2a);
  color: #fff;
  margin-top: auto;
  box-shadow: 0 4px 0 #a71d2a;
}
.bottom-actions {
  margin-top: auto;
}

/* Header & Subheader */
#header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
#header h1 {
  font-size: 1.5rem;
}
#subheader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
#btnAdd, #exportXml {
  --tw-gradient-from: #3170d9 var(--tw-gradient-from-position, 0%);
  --tw-gradient-to: #0783a1 var(--tw-gradient-to-position, 100%);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
  background-image: linear-gradient(to right, var(--tw-gradient-stops));
  color: #fff;
  font-weight: bold;
  padding: 0.6em 1.2em;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.2s, filter 0.2s, transform 0.1s;
}
#btnAdd:hover, #exportXml:hover {
  filter: brightness(1.15) contrast(1.1);
  transform: scale(1.04);
}
#searchInput {
  padding: 0.4em 0.8em;
  border-radius: 999px;
  border: 1.5px solid rgba(59,130,246,0.25);
  background: #1e293b;
  color: #E0E0E0;
  box-shadow: 0 1px 4px 0 rgba(59,130,246,0.07);
  transition: border 0.2s, box-shadow 0.2s;
}
#searchInput:focus {
  border: 1.5px solid #3b82f6;
  box-shadow: 0 2px 8px 0 rgba(59,130,246,0.18);
  outline: none;
}

/* Table Styles */
#reservationsView table, details.day-group table, .renderTable {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff0d;
  border: 1px solid #ffffff1a;
  /* border-radius removed */
  overflow: hidden;
  box-shadow: 0 2px 12px 0 #0002;
}
#reservationsView th,
#reservationsView td,
details.day-group th,
details.day-group td,
.renderTable th,
.renderTable td {
  border-bottom: 1px solid #ffffff1a;
  padding: 0.7em 0.6em;
  text-align: left;
}
#reservationsView th, details.day-group th, .renderTable th {
  background: #232e4d;
  color: #fff;
  font-weight: 600;
  border-bottom: 1.5px solid #3170d9;
}
#reservationsView td, details.day-group td, .renderTable td {
  background: transparent;
  color: #e0e0e0;
}
#reservationsView tr:hover, details.day-group tr:hover, .renderTable tr:hover {
  background: #232e4d;
  cursor: pointer;
  color: #fff;
}
.td-actions{
  display: flex;
}
/* Responsive table columns for mobile */
@media (max-width: 600px) {
  .th-client, .td-client, .th-pret, .td-pret {
    display: none !important;
  }
  /* Ascunde coloanele suplimentare pentru view-ul "all" pe mobil */
  #allTable th:nth-child(2), #allTable td:nth-child(2), /* Client */
  #allTable th:nth-child(4), #allTable td:nth-child(4), /* Data/Ora Intrare */
  #allTable th:nth-child(5), #allTable td:nth-child(5), /* Data/Ora Ieșire */
  #allTable th:nth-child(6), #allTable td:nth-child(6), /* Preț */
  #allTable th:nth-child(8), #allTable td:nth-child(8), /* Tip Plată */
  /* #allTable th:nth-child(9), #allTable td:nth-child(9), Status Plată */
  #allTable th:nth-child(10), #allTable td:nth-child(10) /* Acțiuni */
  {
    display: none !important;
  }
  .btn-action, .btn-save {
padding: 0.5rem 0.75rem !important;
    font-size: 0.9em !important;
  }
  .th-rezervare, .td-rezervare {
    max-width: 48px !important;
    width: 48px !important;
    min-width: 32px !important;
    text-align: center !important;
    padding-left: 0.2em !important;
    padding-right: 0.2em !important;
    font-size: 0.98em !important;
  }
}

/* Group details pe zile */
details.day-group {
  background: rgba(30, 30, 30, 0.85);
  border: 1px solid #333;
  border-radius: 6px;
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(91, 33, 182, 0.08);
}
details.day-group summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: #232e4d;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  border-bottom: 1px solid #3170d9;
}
details.day-group summary::before {
  content: '▶';
  transition: transform 0.2s;
}
details.day-group[open] summary::before {
  content: '▼';
}
details.day-group summary .badge {
  background: #3b82f6;
  color: #fff;
  border-radius: 12px;
  padding: 0.15em 0.5em;
  font-size: 0.8em;
  margin-left: 0.5em;
  line-height: 1;
}

/* Modal & Toast */
#modalOverlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
#modal {
  background: #ffffff0d;
  border: 1px solid #ffffff1a;
  border-radius: 1rem;
  padding: 2rem;
  width: 90vw;
  max-width: 700px;
  max-height: 90vh;
  position: fixed;
  top: 50vh;
  left: 50vw;
  transform: translate(-50%, -50%);
  color: #E0E0E0;
  box-shadow: 0 2px 12px 0 #0002;
  backdrop-filter: blur(12px);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  z-index: 1101;
}
@media (max-width: 900px) {
  #modal {
    left: 50%;
    transform: translate(-50%, -50%);
  }
}
#modal h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}
#modal dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1rem;
  margin-bottom: 2rem;
}
#modal dt {
  font-weight: bold;
  color: #e0e0e0;
}
#modal dt::after {
  content: ":";
  margin-right: 0.25rem;
}
#modal dd {
  margin: 0;
}
#modal input, #modal select, #modal textarea {
  width: 100%;
  padding: .75rem;
  margin-bottom: 1rem;
  border: 1px solid #ffffff1a;
  border-radius: .5rem;
  background: #232e4d;
  color: #E0E0E0;
  font-size: 1rem;
  transition: border 0.2s, background 0.2s;
}
#modal input:focus, #modal select:focus, #modal textarea:focus {
  outline: none;
  border: 1.5px solid #3170d9;
  background: #192653;
}
#modalButtons {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
#modalButtons button, .modal-actions button {
  --tw-gradient-from: #3170d9 var(--tw-gradient-from-position, 0%);
  --tw-gradient-to: #0783a1 var(--tw-gradient-to-position, 100%);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
  flex: 1;
  padding: 0.6em 1em;
  font-weight: bold;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  background-image: linear-gradient(to right, var(--tw-gradient-stops));
  color: #fff;
  box-shadow: none;
  transition: background 0.2s, filter 0.2s, transform 0.1s;
}
#modalButtons button:hover, .modal-actions button:hover {
  filter: brightness(1.15) contrast(1.1);
  transform: scale(1.04);
}
#btnConfirm {
  background: linear-gradient(135deg, #43b720, #328818);
  color: #fff;
  font-size: 1rem;
  border-radius: 0.75rem;
  padding: 0.75rem 1.5rem;
  box-shadow: 0 4px 0 #328818;
  cursor: pointer;
  border: none;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
#btnConfirm:hover {
  box-shadow: 0 6px 0 #328818;
}
#btnConfirm:active {
  transform: translateY(4px);
  box-shadow: 0 0 #328818;
}
#btnCancel {
  background: linear-gradient(135deg, #e74c3c, #a71d2a);
  color: #fff;
}
#modal .close {
  position: absolute;
  top: 10px; right: 10px;
  background: none; border: none;
  font-size: 1.5rem;
  color: #E0E0E0;
  cursor: pointer;
}
#modal .close:hover {
  color: #f28b82;
}

/* Login-style form container */
.login-container {
  background: rgba(30, 30, 30, 0.85);
  padding: 2rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  max-width: 400px;
  margin: auto;
  backdrop-filter: blur(8px);
  width: 100%;
}
.login-container h3 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  text-align: center;
}
.login-container label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
.login-container input,
.login-container select {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: none;
  border-radius: 0.5rem;
  background: #1e293b;
  color: #E0E0E0;
  font-size: 1rem;
}
.login-container input:focus,
.login-container select:focus {
  outline: 2px solid #3b82f6;
  background: #581c87;
}
.login-container button[type="submit"] {
  width: 100%;
  padding: 0.75rem;
  border: none;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.15);
}
.login-container button[type="submit"]:hover {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

/* Toast */
#toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  padding: 0.8em 1.2em;
  border-radius: 0.75rem;
  display: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  animation: fadeInOut 3s forwards;
  z-index: 2000;
}
@keyframes fadeInOut {
  0%   { opacity: 0; transform: translateY(20px); }
  10%  { opacity: 1; transform: translateY(0); }
  90%  { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(20px); }
}

/* KPI Cards */
.kpi-cards {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}
.kpi-card {
  flex: 1;
  background: #ffffff0d;
  border: 1px solid #ffffff1a;
  border-radius: 1rem;
  padding: 0.2rem;
  text-align: center;
  box-shadow: 0 2px 12px 0 #0002;
  transition: box-shadow 0.2s, transform 0.2s;
}
.kpi-card:hover {
  box-shadow: 0 6px 24px 0 #0004;
  transform: scale(1.04);
}
.kpi-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  color: #ccc;
}
.kpi-card p {
  font-size: 2rem;
  font-weight: bold;
  margin: 0;
}

/* Progress Bar */
.progress {
  width: 73%;
  background: #333;
  border-radius: 4px;
  height: 0.5em;
  overflow: hidden;
  margin-top: 0.5em;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  transition: width 0.3s ease;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #3753a8;
  color: #fff;
  border-radius: 999px;
  padding: 0.3em 1.1em;
  font-size: 0.95em;
  font-weight: bold;
  text-align: center;
  line-height: 1.2;
  vertical-align: middle;
  margin-left: 0.4em;
  box-shadow: 0 2px 8px 0 rgba(55, 83, 168, 0.10);
  border: none;
}

/* Card container */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}
.upcoming-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}
.upcoming-card {
  background: #ffffff0d;
  border: 1px solid #ffffff1a;
  border-radius: 1rem;
  padding: 1rem 1.5rem;
  min-width: 12rem;
  box-shadow: 0 2px 12px 0 #0002;
  transition: box-shadow 0.2s, transform 0.2s;
  text-align: left;
}
.upcoming-card:hover {
  box-shadow: 0 6px 24px 0 #0004;
  transform: scale(1.015);
}
.upcoming-card h4 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}
.upcoming-card p {
  margin: 0.25rem 0;
  font-size: 0.9rem;
}

/* 3D Button Styles */
.modal-actions button {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  margin: 0.5rem;
  font-size: 1rem;
  border-radius: 0.75rem;
  cursor: pointer;
  box-shadow: 0 4px 0 #581c87;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.modal-actions button:hover {
  box-shadow: 0 6px 0 #581c87;
  transform: scale(1.05);
}
.modal-actions button:active {
  transform: translateY(4px);
  box-shadow: 0 0 #581c87;
}
.modal-actions #btnCancel {
  background: linear-gradient(135deg, #dc3545, #a71d2a);
  box-shadow: 0 4px 0 #a71d2a;
  color: #fff;
}
.modal-actions #btnCancel:hover {
  box-shadow: 0 6px 0 #a71d2a;
}
.modal-actions #btnCancel:active {
  transform: translateY(4px);
  box-shadow: 0 0 #a71d2a;
}


/* Minimalist 3D Action Button - stil Salveaza */
.btn-action, .btn-save, button[type="submit"] {
  --tw-gradient-from: #3170d9 var(--tw-gradient-from-position, 0%);
  --tw-gradient-to: #0783a1 var(--tw-gradient-to-position, 100%);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
  display: inline-block;
  padding: 0.75rem 1.5rem;
  margin: 0 0.25rem;
  text-decoration: none;
  font-size: 1rem;
  color: #fff;
  background-image: linear-gradient(to right, var(--tw-gradient-stops));
  border: none;
  border-radius: 0.75rem;
  box-shadow: 0 4px 0 #581c87;
  transition: background 0.2s, filter 0.2s, transform 0.1s;
  font-weight: bold;
  cursor: pointer;
}

/* WhatsApp button verde */
a.btn-wapp {
  background: #25D366 !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 0 #1da851 !important;
}
a.btn-wapp:hover {
  filter: brightness(1.08) contrast(1.1);
  background: #1da851 !important;
  color: #fff !important;
}
.btn-action:hover, .btn-save:hover, button[type="submit"]:hover {
  filter: brightness(1.15) contrast(1.1);
  transform: scale(1.04);
}
.btn-action:active, .btn-save:active, button[type="submit"]:active {
  filter: brightness(0.95);
  transform: scale(0.98);
}
/* Buton adaugat in rezervare */
.btn-added {
  background: linear-gradient(135deg, #43b720, #328818);
  color: #fff !important;
  box-shadow: 0 4px 0 #328818;
  border-radius: 0.75rem;
  font-weight: bold;
}
.btn-added:hover, .btn-added:active {
  filter: brightness(1.08) contrast(1.1);
  background: linear-gradient(135deg, #328818, #43b720);
  color: #fff !important;
}

/* Search wrapper */
.search-wrapper {
  display: flex;
  align-items: center;
}
.search-wrapper #searchInput {
  flex: 1;
}
.search-wrapper #viewToggle {
  margin-left: .5rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: #fff;
}

.views {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  justify-content: stretch;
}

.btn-row {
  display: flex;
  gap: 8px;
  width: 100%;
}
.btn-row button {
  flex: 1 1 0;
  height: 100%;
  width: 100%;
  min-height: 50px;
  max-height: 100px;
  box-sizing: border-box;
}
/* Edit container */
.edit-container {
  background: rgba(30, 30, 30, 0.85);
  border-radius: 1rem;
  padding: 2rem;
  max-width: 600px;
  margin: 0 auto;
  color: white;
  box-shadow: 0 4px 24px rgba(59, 130, 246, 0.08);
  backdrop-filter: blur(8px);
}
.edit-container h3 {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 1rem;
}
.edit-container form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.edit-container label {
  font-size: 1rem;
  font-weight: bold;
}
.edit-container input,
.edit-container select {
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid #444;
  border-radius: 0.5rem;
  background-color: #1e293b;
  color: white;
}
.edit-container button {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: white;
  padding: 1rem;
  font-size: 1rem;
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: background 0.3s;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.15);
}
.edit-container button:hover {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}
.edit-container .close {
  font-size: 1.5rem;
  color: white;
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
}

/* Export wrapper */
.export-wrapper {
  align-items: left;
  display: flex;
  gap: 1rem;
}

.servicesDiv {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;

}

/* Centrare butoane servicii suplimentare */
.servicesDiv > div {
  display: flex;
  gap: 1em;
  flex-wrap: wrap;
  justify-content: center;
}

/* Responsive for mobile (iPhone 13 Pro Max and similar) */
#hamburger {
  display: none;
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: #E0E0E0;
  font-size: 2rem;
  cursor: pointer;
  z-index: 1200;
}
@media (max-width: 900px) {
  #sidebar {
    width: 180px;
    padding: 1rem 0.5rem;
  }
  #main {
    padding: 0.5rem;
  }
}
@media (max-width: 600px) {
  /* Blochează scroll-ul fundalului când modalul e deschis */
  body.modal-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100vw !important;
    overscroll-behavior: none !important;
  }
  #modal {
    width: 100vw !important;
    height: 100dvh !important;
    max-width: 100vw !important;
    max-height: 100dvh !important;
    min-width: 100vw !important;
    min-height: 100dvh !important;
    border-radius: 0 !important;
    padding: 0 !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
    position: absolute !important;
    display: flex;
    flex-direction: column;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    z-index: 1101;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }
  .edit-modal-flex,
  .add-modal-flex {
    flex-direction: column !important;
    gap: 0.5rem !important;
    max-width: 100vw !important;
    width: 100vw !important;
    min-width: 100vw !important;
    box-sizing: border-box;
  }
  .login-container {
    max-width: 100vw !important;
    width: 100vw !important;
    min-width: 100vw !important;
    /* padding: 0.5rem !important; */
    min-height: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  .details-container {
    max-width: 100vw !important;
    width: 100vw !important;
    min-width: 100vw !important;
    max-height: 100vh !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    padding: 1.5rem !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  body {
    font-size: 1rem;
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    overflow-x: hidden;
  }
  #sidebar {
    position: fixed;
    top: 0;
    right: -100vw;
    left: auto;
    width: 80vw;
    max-width: 340px;
    height: 100vh;
    padding: 2rem 1rem;
    z-index: 1099;
    background: #232e4d73;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.25);
    border-radius: 1rem 0 0 1rem;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
  }
  #sidebar.open {
    right: 0;
    left: auto;
  }
  #main {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 1rem;
    overflow-x: hidden;
  }
  #hamburger {
    display: block;
    right: 1rem;
    left: auto;
    top: 0rem;
    position: fixed;
    z-index: 1100;
  }
  /* Responsive header: title + search on same row */
  #header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
  }
  #header h1 {
    flex: 1;
    font-size: 1.1rem !important;
    margin-bottom: 0 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #header #searchInput {
    min-width: 0;
    width: 60%;
    max-width: 220px;
    margin-left: 1rem;
  }
  /* Subheader: buttons stacked */
  #subheader {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  #btnAdd, #exportXml {
    width: 100%;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    padding: 0.5em 0.7em;
  }
  .export-wrapper {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }
  .badge {
    font-size: 0.9em;
    padding: 0.22em 0.7em;
    margin-left: 0.25em;
  }
  #exportXml {
    display: none !important;
  }
  .kpi-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  .kpi-card {
    min-width: 0;
    font-size: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  .kpi-card h3, .kpi-card p {
    font-size: 1rem;
  }
}
/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}
.floating {
  animation: float 6s ease-in-out infinite;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
button:focus,
a:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}
@media (prefers-contrast: high) {
  .text-white\/60,
  .text-white\/70,
  .text-white\/80 {
    color: #ffffff !important;
  }
}

/* --- MODIFICARE PENTRU MODAL ADĂUGARE REZERVARE --- */
.add-modal-flex {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 2rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.add-modal-flex > .login-container:first-child {
  width: 65%;
  min-width: 260px;
  max-width: 600px;
}
.add-modal-flex > #addSummary {
  width: 35%;
  min-width: 220px;
  max-width: 320px;
}
@media (max-width: 900px) {
  .add-modal-flex {
    flex-direction: column !important;
    gap: 1rem !important;
    align-items: stretch !important;
    max-width: 100vw !important;
    width: 100vw !important;
    min-width: 100vw !important;
    box-sizing: border-box;
  }
  .add-modal-flex > .login-container:first-child,
  .add-modal-flex > #addSummary {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100vw !important;
  }
}
