* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7ff 0%, #eef4ff 100%);
    color: #1f2a44;
}

.page-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 20px 48px;
}

.hero-card,
.content-card {
    background: #ffffff;
    border: 1px solid #dfe7ff;
    border-radius: 24px;
    box-shadow: 0 12px 35px rgba(31, 42, 68, 0.08);
}

.hero-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 12px 32px;
    margin-bottom: 24px;
}

.eyebrow {
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    font-size: 0.74rem;
    font-weight: 700;
    color: #5b6ef2;
}

h1,
h2,
h3,
p {
    margin: 0;
}

h1 {
    font-size: 1.7rem;
    color: #14213d;
}

h2 {
    font-size: 1.1rem;
    color: #14213d;
}

.subtitle {
    margin-top: 8px;
    color: #67708a;
    max-width: 650px;
}

.button,
.button:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #4f6cf3 0%, #3d55dd 100%);
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(79, 108, 243, 0.2);
}

.button.secondary {
    background: #eef2ff;
    color: #3d55dd;
}

.content-card {
    padding: 24px 24px 28px;
    margin-bottom: 24px;
}

.dashboard-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: 1.1fr 0.9fr;
}

.admin-page-shell {
    max-width: 1440px;
}

.admin-layout {
    display: grid;
    gap: 18px;
}

.admin-form-card {
    padding: 18px 24px 20px;
    position: sticky;
    top: 12px;
    z-index: 20;
}

.admin-form-card .table-toolbar {
    margin-bottom: 12px;
}

.admin-form-card .record-form {
    align-items: stretch;
    display: grid;
    gap: 14px 16px;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.3fr);
}

.admin-form-card .form-grid {
    align-items: end;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(130px, 1fr));
}

.admin-form-card .date-time-field {
    grid-column: span 2;
}

.admin-form-card .zoom-link-field {
    grid-column: 1 / -1;
}

.admin-form-card .record-form > label:not(.date-time-field) {
    min-width: 0;
}

.admin-form-card .record-form > label {
    grid-column: 2;
}

.admin-form-card .record-form > .form-grid {
    grid-column: 1;
}

.admin-form-card textarea {
    min-height: 150px;
}

.admin-form-card .form-actions {
    align-self: end;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
}

.admin-form-card .form-actions .button {
    min-width: 0;
    padding-left: 14px;
    padding-right: 14px;
}

.admin-list-card {
    margin-bottom: 0;
}

.admin-list-card .table-wrap {
    max-height: calc(100vh - 360px);
    min-height: 340px;
    overflow: auto;
}

.admin-list-card .modern-table th {
    position: sticky;
    top: 0;
    z-index: 5;
}

.table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.pill {
    background: #eef2ff;
    color: #3d55dd;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.86rem;
    font-weight: 600;
}

.toolbar-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
    margin-bottom: 10px;
}

.control-field {
    min-width: 220px;
    flex: 1;
}

.control-field span {
    font-size: 0.82rem;
    font-weight: 700;
    color: #5b6ef2;
}

.results-meta {
    margin-bottom: 12px;
    color: #67708a;
    font-size: 0.9rem;
}

.sortable {
    cursor: pointer;
    user-select: none;
}

.sort-indicator {
    color: #8a95bd;
    margin-left: 4px;
}

.compact-toolbar {
    margin-top: 6px;
}

.flash {
    margin-bottom: 16px;
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 600;
}

.flash:empty {
    display: none;
}

.flash.is-hidden {
    display: none;
}

.flash-with-action {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.flash-close {
    align-items: center;
    background: rgba(179, 57, 43, 0.1);
    border: none;
    border-radius: 999px;
    color: #b3392b;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.25rem;
    font-weight: 700;
    height: 30px;
    justify-content: center;
    line-height: 1;
    width: 30px;
}

.flash-close:hover {
    background: rgba(179, 57, 43, 0.18);
}

.flash.success {
    background: #eaf9ef;
    color: #277a3f;
}

.flash.error {
    background: #fdecea;
    color: #b3392b;
}

.table-wrap {
    overflow-x: auto;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.modern-table th,
.modern-table td {
    padding: 7px 8px;
    text-align: left;
    border-bottom: 1px solid #eef2ff;
    line-height: 1.25;
}

.modern-table th {
    color: #f5f5f5;
    font-size: 0.88rem;
    background: #1e8cdd;
    padding-bottom: 9px;
    padding-top: 9px;
}

.modern-table tbody tr {
    transition: background 0.2s ease;
}

.modern-table tbody tr:hover {
    background: #f8fbff;
}

.row-disponibil {
    background: #9feab5;
}

.row-finalizat {
    background: #eaa9a4;
}

.row-anulat {
    background: #ffeb00;
    color: #b00000;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}

.status-disponibil {
    background: #72d490;
    color: #123d20;
}

.status-finalizat {
    background: #de6f65;
    color: #551914;
}

.status-anulat {
    background: #ffeb00;
    color: #b00000;
}

.status-select {
    width: 122px;
    margin: 0;
    padding: 5px 8px;
    border-radius: 8px;
    border: 1px solid rgba(20, 33, 61, 0.18);
    color: #14213d;
    font-weight: 700;
}

.status-select.status-disponibil {
    color: #123d20;
}

.status-select.status-finalizat {
    color: #551914;
}

.status-select.status-anulat {
    color: #b00000;
}

.record-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.date-time-field {
    grid-column: 1 / -1;
}

.date-time-control {
    align-items: end;
    background: #f8faff;
    border: 1px solid #d7def6;
    border-radius: 16px;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(180px, 1fr) minmax(92px, 0.35fr) auto minmax(96px, 0.35fr);
    padding: 12px;
}

.date-picker-part,
.time-picker-part {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.field-caption {
    color: #67708a;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.date-time-control input,
.date-time-control select {
    background: #ffffff;
    border-radius: 10px;
    padding: 9px 10px;
}

.time-divider {
    align-self: end;
    color: #5b6ef2;
    font-weight: 800;
    padding-bottom: 10px;
}

label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 600;
    color: #31405f;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #d7def6;
    border-radius: 12px;
    padding: 10px 12px;
    font: inherit;
    color: #14213d;
    background: #fcfdff;
}

textarea {
    resize: vertical;
    min-height: 110px;
}

.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.link {
    color: #3d55dd;
    text-decoration: none;
    font-weight: 600;
}

.link.danger {
    color: #b3392b;
}

.text-muted {
    color: #7c86a5;
}

.compact-table {
    min-width: 780px;
}

.zoom-link-cell {
    white-space: nowrap;
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .admin-form-card {
        position: static;
    }

    .admin-form-card .record-form {
        grid-template-columns: 1fr;
    }

    .admin-form-card .form-grid,
    .admin-form-card .record-form > label,
    .admin-form-card .form-actions {
        grid-column: 1;
    }

    .admin-form-card .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-row: auto;
    }

    .admin-form-card .date-time-field {
        grid-column: 1 / -1;
    }

    .admin-form-card .zoom-link-field,
    .admin-form-card .form-grid .form-actions {
        grid-column: 1 / -1;
    }

    .admin-list-card .table-wrap {
        max-height: none;
    }

    .hero-card {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .page-shell {
        padding: 20px 12px 32px;
    }

    .hero-card,
    .content-card {
        padding: 18px;
        border-radius: 16px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .date-time-control {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .date-picker-part {
        grid-column: 1 / -1;
    }

    .time-divider {
        display: none;
    }
}  table.f1,
  table.tbl1,
  table.tbl2,
  ul.tabs {
    width: 100%;
  }

  .tab {
    height: auto;
  }

  .tab a {
    white-space: normal;
  }
}
.refresh-page-btn {
  margin-bottom: 8px !important;
}

.update-fieldset {
  background: #ffffff;
  border: 1px solid #d6d8df;
  border-radius: 6px;
  margin: 0 0 12px;
  padding: 10px 12px;
}

.update-fieldset legend {
  color: #31408c;
  font-weight: 700;
  padding: 0 8px;
}

.report-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.report-loaded-at {
  color: #31408c;
  font-weight: 700;
}

.month-select-form {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.month-select-form label {
  color: #31408c;
}

.month-select-form select {
  border: 1px solid #cccccc;
  border-radius: 4px;
  color: #31408c;
  font: 14px Verdana, Arial, sans-serif;
  padding: 5px 28px 5px 8px;
}

.report-toolbar .refresh-page-btn,
.refresh-report-btn {
  background: #b34700 !important;
  color: #ffffff !important;
  margin-bottom: 0 !important;
}

.report-toolbar .refresh-page-btn:hover,
.refresh-report-btn:hover {
  background: #cc5500 !important;
  color: #ffffff !important;
}

.search-form {
  margin: 0 0 12px;
}

.search-form input[type="text"] {
  border: 1px solid #cccccc;
  border-radius: 4px;
  color: #31408c;
  font: 14px Verdana, Arial, sans-serif;
  margin: 0 6px;
  padding: 6px 8px;
  width: 140px;
}

.search-form input.search-input-wide {
  max-width: 100%;
  width: 320px;
}

.message-error {
  color: #b00020;
  font-weight: 700;
}
