.admin-page { min-height: 100vh; }
.admin-return { color: var(--sage-dark); font-size: 10px; text-decoration: none; }
.admin-return span { margin-left: 8px; color: var(--clay); }
.admin-main { width: min(930px, 86%); margin: 70px auto 90px; }
.admin-intro { margin-bottom: 27px; }
.admin-intro h1 { margin: 11px 0 7px; font-family: var(--serif); font-size: 42px; font-weight: 500; }
.admin-intro p { color: var(--muted); font-size: 11px; }
.admin-card { min-height: 250px; padding: 30px; border: 1px solid var(--line); background: var(--white); box-shadow: 0 18px 55px rgba(65,67,53,.045); }
.admin-login { max-width: 390px; margin: 0 auto; }
.admin-login h2, .dashboard-heading h2 { margin: 0 0 7px; font-family: var(--serif); font-size: 24px; font-weight: 500; }
.admin-login > p:not(.admin-message) { margin: 0 0 18px; color: var(--muted); font-size: 10px; }
.admin-login label { display: block; margin: 14px 0 7px; color: #555b50; font-size: 9px; font-weight: 600; }
.admin-login input, .dashboard-tools input, .dashboard-tools select { width: 100%; height: 41px; padding: 0 11px; border: 1px solid #e8e5dd; border-radius: 2px; outline: none; background: #fffefa; color: var(--ink); font-size: 10px; }
.admin-login input:focus, .dashboard-tools input:focus, .dashboard-tools select:focus { border-color: #99a18e; }
.admin-message { min-height: 16px; margin: 9px 0 4px; color: #a14d43; font-size: 9px; line-height: 1.5; }
.admin-message.success { color: var(--sage-dark); }
.dashboard-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dashboard-heading .eyebrow { display: block; margin-bottom: 8px; }
.dashboard-tools { display: grid; grid-template-columns: 1fr 180px auto; gap: 10px; margin-top: 18px; }
.dashboard-tools .button { min-height: 41px; }
.daily-overview { display: grid; grid-template-columns: 1.25fr repeat(3, 1fr); gap: 10px; margin: 21px 0 13px; }
.day-picker, .finance-card { display: flex; min-height: 71px; flex-direction: column; justify-content: center; gap: 7px; padding: 11px 13px; border: 1px solid var(--line); background: #fffefa; }
.day-picker > span, .finance-card small { color: var(--quiet); font-size: 8px; font-weight: 700; letter-spacing: .12em; }
.day-picker input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11px; }
.finance-card strong { color: var(--ink); font-family: var(--serif); font-size: 19px; font-weight: 500; }
.finance-paid { border-color: #d8e8d8; background: #f3f8f1; }
.finance-paid strong { color: #4c704e; }
.finance-pending { border-color: #efe2c9; background: #fbf7ed; }
.finance-pending strong { color: #8b7045; }
.schedule-panel { margin-top: 19px; padding: 19px; border: 1px solid var(--line); background: #fcfbf7; }
.schedule-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; }
.schedule-heading h3, .daily-appointments-title { margin: 7px 0 0; font-family: var(--serif); font-size: 19px; font-weight: 500; }
.schedule-service { display: grid; gap: 6px; color: var(--muted); font-size: 8px; }
.schedule-service select { min-width: 180px; height: 33px; padding: 0 9px; border: 1px solid #e4e1d8; background: white; color: var(--ink); font-size: 9px; }
.schedule-legend { display: flex; flex-wrap: wrap; gap: 9px 15px; margin: 16px 0 11px; }
.schedule-legend > span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 8px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.slot-open.legend-dot, .slot-open .legend-dot { background: #77a67a; }
.slot-registered.legend-dot, .slot-registered .legend-dot { background: #d19b4e; }
.slot-confirmed.legend-dot, .slot-confirmed .legend-dot { background: #7289ad; }
.slot-attended.legend-dot, .slot-attended .legend-dot { background: #74806b; }
.slot-cancelled.legend-dot, .slot-cancelled .legend-dot { background: #aa8c8c; }
.slot-paid.legend-dot { background: #4f8b5b; }
.daily-schedule { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.schedule-slot { display: grid; min-height: 76px; align-content: center; gap: 4px; padding: 9px; border: 1px solid; border-left-width: 3px; border-radius: 2px; }
.schedule-slot time { font-size: 10px; font-weight: 700; }
.schedule-slot > span { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.schedule-slot small { color: inherit; font-size: 7px; opacity: .78; }
.schedule-slot.slot-open { border-color: #cfe1cb; border-left-color: #6c9a6d; background: #f0f7ee; color: #4b704e; }
.schedule-slot.slot-registered { border-color: #ead9bd; border-left-color: #c18b3f; background: #fbf5e9; color: #86602d; }
.schedule-slot.slot-confirmed { border-color: #d1dced; border-left-color: #6781a8; background: #f0f4fa; color: #4c6487; }
.schedule-slot.slot-attended { border-color: #d2ddcc; border-left-color: #748b68; background: #f1f5ee; color: #536748; }
.schedule-slot.slot-cancelled, .schedule-slot.slot-busy { border-color: #e6e1dc; border-left-color: #a69b8c; background: #f4f2ed; color: #80786e; }
.schedule-slot.slot-payment-paid { box-shadow: inset 0 -2px #4f8b5b; }
.schedule-empty { grid-column: 1 / -1; padding: 17px; border: 1px dashed #dedbd1; color: var(--muted); font-size: 9px; text-align: center; }
.daily-appointments-title { margin: 23px 0 12px; }
.appointment-list { display: grid; gap: 9px; }
.appointment-row { display: grid; grid-template-columns: 1.1fr .8fr 1.1fr 1.35fr; align-items: center; gap: 15px; padding: 15px; border: 1px solid var(--line); background: #fffefa; }
.appointment-row small { display: block; margin-bottom: 5px; color: var(--quiet); font-size: 8px; }
.appointment-row strong { display: block; font-size: 10px; font-weight: 600; }
.appointment-row .contact { margin-top: 4px; color: var(--muted); font-size: 8px; overflow-wrap: anywhere; }
.appointment-row select { width: 100%; height: 34px; border: 1px solid #e4e1d8; background: white; color: var(--ink); font-size: 9px; }
.appointment-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.control-label { display: grid; gap: 4px; color: var(--quiet); font-size: 7px; }
.control-label:last-child { grid-column: 1 / -1; }
.appointment-empty { padding: 24px; border: 1px dashed #d6d6cb; color: var(--muted); font-size: 10px; text-align: center; }
.admin-footer { padding: 22px 7%; border-top: 1px solid var(--line); color: var(--quiet); font-size: 9px; text-align: center; }
.admin-tabs { display: flex; gap: 5px; margin: 18px 0; border-bottom: 1px solid var(--line); }
.admin-tab { padding: 11px 17px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; }
.admin-tab.active { border-bottom-color: var(--sage-dark); color: var(--sage-dark); font-weight: 700; }
.users-tools { display: grid; grid-template-columns: minmax(220px, 1fr) auto; align-items: end; gap: 8px 14px; margin: 16px 0 12px; }
.users-tools label { grid-column: 1; color: var(--muted); font-size: 9px; }
.users-tools input { grid-column: 1; width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--line); background: #fffefa; color: var(--ink); font-size: 10px; }
.users-tools strong { grid-column: 2; grid-row: 1 / span 2; color: var(--sage-dark); font-size: 10px; }
.users-table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--white); }
.users-table { width: 100%; min-width: 650px; border-collapse: collapse; text-align: left; }
.users-table th, .users-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); font-size: 9px; }
.users-table th { background: #fcfbf7; color: var(--quiet); font-size: 8px; font-weight: 700; letter-spacing: .04em; }
.users-table td { color: var(--ink); overflow-wrap: anywhere; }
.users-table td[data-label="Sesiones restantes"] strong { color: var(--sage-dark); font-size: 12px; }
.users-table tbody tr:last-child td { border-bottom: 0; }
.users-table .button { min-height: 32px; padding: 0 9px; white-space: nowrap; font-size: 8px; }
.user-status { display: inline-block; padding: 5px 8px; border-radius: 12px; background: #f8f1e6; color: #86602d; font-size: 8px; white-space: nowrap; }
.user-status.active { background: #edf5eb; color: #4c704e; }
.users-empty { padding: 24px !important; color: var(--muted) !important; text-align: center; }
.client-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 16px 0 10px; }
.client-panel-heading h3 { margin: 7px 0; font-family: var(--serif); font-size: 22px; font-weight: 500; }
.client-panel-heading p { max-width: 550px; margin: 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.client-workspace { display: grid; grid-template-columns: minmax(190px, .65fr) minmax(0, 1.7fr); gap: 15px; align-items: start; }
.client-directory, .client-form { padding: 16px; border: 1px solid var(--line); background: var(--white); }
.client-directory > label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 9px; }
.client-directory input[type="search"] { width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--line); background: #fffefa; font-size: 10px; }
.client-list { display: grid; gap: 6px; max-height: 620px; overflow: auto; margin-top: 11px; }
.client-list button { padding: 10px; border: 1px solid transparent; background: #f8f6f0; text-align: left; cursor: pointer; }
.client-list button:hover, .client-list button[aria-current="true"] { border-color: #cdd4c5; background: #f1f4ed; }
.client-list strong, .client-list span { display: block; overflow-wrap: anywhere; }
.client-list strong { font-size: 10px; }
.client-list span { margin-top: 4px; color: var(--muted); font-size: 8px; }
.client-empty { padding: 14px 6px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.client-form h4 { margin: 0 0 14px; font-family: var(--serif); font-size: 17px; font-weight: 500; }
.client-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.client-field { display: grid; gap: 6px; color: var(--muted); font-size: 9px; }
.client-field input, .client-field textarea { width: 100%; min-width: 0; padding: 9px; border: 1px solid var(--line); border-radius: 2px; background: #fffefa; color: var(--ink); font-size: 10px; }
.client-field select { width: 100%; min-width: 0; height: 37px; padding: 0 9px; border: 1px solid var(--line); border-radius: 2px; background: #fffefa; color: var(--ink); font-size: 10px; }
.client-field input { height: 37px; }
.client-field textarea { resize: vertical; line-height: 1.5; }
.client-field-wide { grid-column: 1 / -1; }
.sensitive-fields { margin: 16px 0 0; padding: 14px; border: 1px solid #e9d9ca; background: #fcf8f3; }
.sensitive-fields legend { padding: 0 5px; color: #795c49; font-size: 10px; font-weight: 700; }
.sensitive-fields > p, .sensitive-fields > small { color: var(--muted); font-size: 8px; line-height: 1.6; }
.sensitive-fields > p { margin: 0 0 12px; }
.sensitive-fields > small { display: block; margin: 8px 0 0; }
.consent-field { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; color: #694f3f; font-size: 9px; line-height: 1.5; }
.consent-field input { flex: 0 0 auto; margin-top: 2px; }
.client-form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.client-field > span { color: var(--quiet); font-size: 8px; line-height: 1.5; }
.package-management { margin-top: 16px; padding: 13px; border: 1px solid var(--line); background: #fcfbf7; }
.package-management h5 { margin: 0 0 10px; color: var(--ink); font-size: 10px; }
.package-create-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 11px 0; }
.expense-form { display: grid; grid-template-columns: 2fr 1fr 1fr auto; align-items: end; gap: 10px; margin: 12px 0 22px; }
.expense-form .button { min-height: 37px; }
.admin-tab-panel > h4 { margin: 20px 0 9px; font-family: var(--serif); font-size: 16px; font-weight: 500; }
.package-appointment-form { max-width: 820px; margin-top: 14px; }
.package-appointment-form > .button { margin-top: 8px; }
.package-session-note { padding: 12px; border: 1px solid var(--line); background: #f4f4ed; color: var(--sage-dark); font-size: 10px; line-height: 1.5; }
.package-create-fields select { height: 37px; padding: 0 9px; border: 1px solid var(--line); background: #fffefa; color: var(--ink); font-size: 9px; }
.package-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 7px 0; padding: 11px; border: 1px solid var(--line); background: var(--white); }
.package-item > div { min-width: 0; }
.package-item strong { display: block; font-size: 10px; }
.package-item span { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; overflow-wrap: anywhere; }
.package-empty { padding: 14px; border: 1px dashed var(--line); color: var(--muted); font-size: 9px; line-height: 1.5; }

@media (max-width: 760px) {
  .admin-main { width: 90%; margin-top: 45px; }
  .admin-card { padding: 22px 17px; }
  .dashboard-tools { grid-template-columns: 1fr 1fr; }
  .dashboard-tools input { grid-column: 1 / -1; }
  .daily-overview { grid-template-columns: 1fr 1fr; }
  .daily-schedule { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .appointment-row { grid-template-columns: 1fr 1fr; gap: 13px; }
  .appointment-controls { grid-column: 1 / -1; }
  .client-workspace { grid-template-columns: 1fr; }
  .expense-form { grid-template-columns: 1fr 1fr; }
  .client-list { max-height: 210px; }
  .client-panel-heading { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 460px) {
  .client-fields { grid-template-columns: 1fr; }
  .client-field-wide { grid-column: auto; }
  .client-form, .client-directory { padding: 12px; }
  .users-tools { grid-template-columns: 1fr; }
  .users-tools label, .users-tools input, .users-tools strong { grid-column: 1; grid-row: auto; }
}
@media (max-width: 460px) {
  .admin-return { max-width: 110px; font-size: 9px; }
  .admin-intro h1 { font-size: 35px; }
  .dashboard-heading { align-items: flex-start; }
  .dashboard-heading .button { min-height: 35px; padding: 0 10px; font-size: 9px; }
  .dashboard-tools { grid-template-columns: 1fr; }
  .dashboard-tools input { grid-column: auto; }
  .expense-form { grid-template-columns: 1fr; }
  .schedule-heading { align-items: flex-start; flex-direction: column; }
  .schedule-service, .schedule-service select { width: 100%; }
  .schedule-panel { padding: 14px 10px; }
  .schedule-legend { gap: 8px 10px; }
  .daily-schedule { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
