/* ===========================
   Backbar – Cream UI
   =========================== */

:root {
    /* Backgrounds */
    --bb-bg-page: #e5e7eb;              /* grey very light */
    --bb-bg-shell: #f9fafb;             /* almost white */
    --bb-bg-card: #ffffff;
    --bb-bg-card-soft: #fdf7ec;         /* warm cream */
    --bb-bg-pill: #f3f4ff;

    /* Borders & shadows */
    --bb-border-subtle: #e5e7eb;
    --bb-shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.10);
    --bb-radius-lg: 22px;
    --bb-radius-xl: 30px;
    --bb-radius-full: 999px;

    /* Typography */
    --bb-text-main: #111827;
    --bb-text-muted: #6b7280;
    --bb-text-soft: #9ca3af;

    /* Accent */
    --bb-accent: #fbbf24;              /* warm yellow */
    --bb-accent-soft: #fef3c7;
    --bb-accent-strong: #f59e0b;

    /* States */
    --bb-success: #22c55e;
    --bb-success-soft: #dcfce7;
    --bb-danger: #f97373;
    --bb-danger-soft: #fee2e2;
}

/* Reset mic */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

/* Page */

body {
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
    background: radial-gradient(circle at top right, #fef9c3 0, #e5e7eb 55%, #e5e7eb 100%);
    color: var(--bb-text-main);
}

/* Shell central */

.bb-shell {
    max-width: 1320px;
    margin: 32px auto;
    padding: 24px;
}

@media (max-width: 960px) {
    .bb-shell {
        margin: 12px auto;
        padding: 12px;
    }
}

.bb-shell-inner {
    background: linear-gradient(135deg, #fdfdfd, #fff7e9);
    border-radius: var(--bb-radius-xl);
    box-shadow: var(--bb-shadow-soft);
    padding: 20px 24px 28px;
}

/* Header */

.bb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(209, 213, 219, 0.6);
}

.bb-header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bb-logo {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.bb-user-line {
    font-size: 14px;
    color: var(--bb-text-muted);
}

/* Top nav pills */

.bb-nav {
    display: inline-flex;
    padding: 4px;
    border-radius: 999px;
    background: rgba(243, 244, 246, 0.9);
    box-shadow: 0 1px 0 rgba(148, 163, 184, 0.4);
}

.bb-nav-link {
    border-radius: 999px;
    border: 0;
    background: transparent;
    font-size: 13px;
    padding: 6px 14px;
    color: var(--bb-text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bb-nav-link span.dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #d1d5db;
}

.bb-nav-link.is-active {
    background: #ffffff;
    color: var(--bb-text-main);
    box-shadow: 0 8px 18px rgba(148, 163, 184, 0.5);
}

.bb-nav-link.is-active span.dot {
    background: var(--bb-accent);
}

/* Right header actions */

.bb-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bb-pill {
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--bb-accent-soft);
    color: var(--bb-accent-strong);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bb-pill-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--bb-accent-strong);
}

.bb-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f97316, #fbbf24);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
}

/* Buttons */

.bb-btn {
    border-radius: var(--bb-radius-full);
    border: 0;
    padding: 7px 15px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.bb-btn-primary {
    background: var(--bb-accent);
    color: #1f2933;
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.4);
}

.bb-btn-primary:hover {
    background: var(--bb-accent-strong);
}

.bb-btn-ghost {
    background: transparent;
    color: var(--bb-text-muted);
}

.bb-btn-ghost:hover {
    background: rgba(209, 213, 219, 0.35);
}

/* Layout grid */

.bb-main {
    padding-top: 18px;
}

.bb-grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(260px, 1.35fr);
    gap: 18px;
}

@media (max-width: 960px) {
    .bb-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Cards */

.bb-card {
    border-radius: var(--bb-radius-lg);
    background: var(--bb-bg-card);
    border: 1px solid rgba(229, 231, 235, 0.7);
    box-shadow: 0 12px 30px rgba(148, 163, 184, 0.28);
    padding: 16px 18px 18px;
}

.bb-card-soft {
    background: var(--bb-bg-card-soft);
}

.bb-card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.bb-card-title {
    font-size: 18px;
    font-weight: 600;
}

.bb-card-subtitle {
    font-size: 13px;
    color: var(--bb-text-muted);
}

/* Dashboard sections */

.bb-section-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.bb-section-text {
    font-size: 13px;
    color: var(--bb-text-muted);
}

.bb-link {
    color: #2563eb;
    text-decoration: none;
    font-size: 13px;
}

.bb-link:hover {
    text-decoration: underline;
}

/* Small list of quick actions */

.bb-actions-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.bb-actions-list a {
    font-size: 13px;
}

/* Right column (profil / status) */

.bb-profile-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.bb-profile-name {
    font-weight: 600;
    font-size: 14px;
}

.bb-profile-role {
    font-size: 12px;
    color: var(--bb-text-muted);
}

.bb-profile-meta {
    margin-top: 8px;
    font-size: 12px;
    color: var(--bb-text-soft);
    display: grid;
    row-gap: 4px;
}

/* Calendar placeholder */

.bb-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    margin-top: 12px;
}

.bb-calendar-day {
    border-radius: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    height: 54px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
}

.bb-calendar-day.is-highlight {
    background: var(--bb-accent-soft);
    border-color: var(--bb-accent);
    color: #92400e;
    font-weight: 600;
}

/* Shifts page */

.bb-page-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.bb-page-subtitle {
    font-size: 13px;
    color: var(--bb-text-muted);
    margin-bottom: 14px;
}

.bb-shifts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.bb-shift-item {
    border-radius: 16px;
    border: 1px solid rgba(229, 231, 235, 0.9);
    background: #ffffff;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 2fr) auto;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

@media (max-width: 800px) {
    .bb-shift-item {
        grid-template-columns: minmax(0, 1fr);
        align-items: flex-start;
    }
}

.bb-shift-date {
    font-weight: 600;
}

.bb-shift-role {
    color: var(--bb-text-muted);
}

.bb-badge {
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bb-badge-success {
    background: var(--bb-success-soft);
    color: #166534;
}

.bb-badge-muted {
    background: #e5e7eb;
    color: var(--bb-text-muted);
}

/* Footer tiny */

.bb-footer {
    margin-top: 16px;
    font-size: 11px;
    color: var(--bb-text-soft);
    text-align: right;
}


/* ====== LOGIN LAYOUT (LIGHT / CREAM) ====== */

.login-body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
        "Inter", sans-serif;

    /* text închis, ca pe dashboard-ul crem */
    color: #111827;

    background:
        radial-gradient(circle at top left, rgba(251, 191, 36, 0.22), transparent 60%),
        radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.18), transparent 60%),
        #f3f4f6; /* crem deschis */
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-shell {
    width: 100%;
    max-width: 920px;
    margin: 24px;
    padding: 24px;
    border-radius: 24px;
    background: #f9fafb; /* card mare deschis */
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.16);
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.3fr);
    gap: 32px;
    border: 1px solid rgba(148, 163, 184, 0.35);
}

@media (max-width: 768px) {
    .login-shell {
        grid-template-columns: minmax(0, 1fr);
        padding: 20px;
        margin: 16px;
    }
}

/* Left side – brand */

.login-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    padding: 16px 8px 16px 4px;
    border-right: 1px solid rgba(148, 163, 184, 0.35);
}

@media (max-width: 768px) {
    .login-brand {
        border-right: none;
        border-bottom: 1px solid rgba(148, 163, 184, 0.35);
        padding-bottom: 20px;
        margin-bottom: 12px;
    }
}

.login-logo-circle {
    width: 56px;
    height: 56px;
    border-radius: 20px;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 28px rgba(248, 181, 51, 0.5);
}

.login-logo-text {
    font-weight: 700;
    font-size: 22px;
    /* să fie lizibil pe portocaliu → închis, dar nu negru pur */
    color: #111827;
}

.login-brand-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-brand-title {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: 0.03em;
}

.login-brand-subtitle {
    font-size: 14px;
    line-height: 1.5;
    color: #6b7280;
}

/* Right side – card */

.login-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 20px 22px 18px;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(148, 163, 184, 0.35);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.login-card-header h2 {
    font-size: 20px;
    margin: 0 0 4px;
    color: #0f172a;
}

.login-card-header p {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}

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

/* Form fields */

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 13px;
    font-weight: 500;
    color: #4b5563;
}

.form-input {
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.8);
    background: #f9fafb;
    padding: 9px 14px;
    font-size: 14px;
    color: #111827;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.form-input:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.85);
    background: #ffffff;
}

.form-input::placeholder {
    color: rgba(148, 163, 184, 0.9);
}

/* Errors */

.form-errors-global {
    border-radius: 12px;
    padding: 10px 12px;
    background: rgba(248, 113, 113, 0.08);
    color: #b91c1c;
    font-size: 13px;
    border: 1px solid rgba(248, 113, 113, 0.5);
}

.form-errors {
    margin-top: 4px;
    color: #b91c1c;
    font-size: 12px;
}

/* Checkbox */

.form-checkbox-row {
    font-size: 13px;
    color: #4b5563;
}

.form-checkbox-row label {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Buttons */

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 999px;
    border: none;
    outline: none;
    cursor: pointer;
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    color: #0f172a;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 12px 30px rgba(56, 189, 248, 0.35);
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: 0 18px 40px rgba(56, 189, 248, 0.45);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 8px 20px rgba(56, 189, 248, 0.3);
}

.w-full {
    width: 100%;
}

/* Footer */

.login-card-footer {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px dashed rgba(148, 163, 184, 0.6);
    font-size: 11px;
    color: #6b7280;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pill-highlight {
    display: inline-flex;
    align-items: center;
    padding: 1px 8px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.12);
    color: #92400e;
    font-weight: 500;
}

.login-meta {
    opacity: 0.8;
}



/* ====== WEEK SCHEDULE GRID ====== */

.bb-week-nav {
    display: flex;
    gap: 8px;
    align-items: center;
}

.bb-week-toolbar {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: flex-end;
}

.bb-week-toolbar-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
}

.bb-filter-label,
.bb-week-toolbar-group .bb-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--bb-text-soft);
}

.bb-filter-select {
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    padding: 6px 12px;
    font-size: 13px;
    background: #f9fafb;
    color: var(--bb-text-main);
}

/* Wrapper + tabel */

.bb-week-grid-wrapper {
    margin-top: 12px;
    border-radius: 18px;
    border: 1px solid rgba(209, 213, 219, 0.9);
    overflow: hidden;
    background: #f3f4f6;
}

.bb-week-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #f9fafb;
}

.bb-week-table thead {
    background: linear-gradient(
        135deg,
        rgba(250, 250, 250, 1),
        rgba(254, 243, 199, 0.9)
    );
}

.bb-week-table th,
.bb-week-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
}

.bb-week-table th:last-child,
.bb-week-table td:last-child {
    border-right: none;
}

.bb-week-dept-row {
    background: rgba(189, 192, 198, 0.95);
}

.bb-week-dept-cell {
    padding: 6px 12px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #ffffff;
    border-bottom: 1px solid #bec0c4;
}


.bb-week-col-employee {
    text-align: left;
    min-width: 210px;
}

/* Head de zi */

.bb-week-day-name {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--bb-text-soft);
}

.bb-week-day-date {
    font-size: 14px;
    font-weight: 600;
    color: var(--bb-text-main);
}

/* Rând departament */

.bb-week-department-row td {
    background: #f3f4f6;
}

.bb-week-department-label {
    padding: 8px 10px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bb-text-soft);
}

/* Coloană angajat */

.bb-week-employee-cell {
    background: #ffffff;
    position: sticky;
    left: 0;
    z-index: 2;
}

.bb-week-employee {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bb-week-avatar {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f97316, #fbbf24);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(248, 181, 51, 0.5);
}

.bb-week-employee-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.bb-week-employee-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--bb-text-main);
}

.bb-week-position-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    background: #eef2ff;
    color: #4f46e5;
}

/* Celule zile */

.bb-week-cell {
    min-width: 110px;
    vertical-align: top;
    background: #f9fafb;
}

.bb-week-free {
    font-size: 11px;
    color: var(--bb-text-muted);
    opacity: 0.8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 22px;
    border-radius: 999px;
    border: 1px dashed rgba(148, 163, 184, 0.7);
    background: rgba(248, 250, 252, 0.7);
}

/* „bulinele” cu ture */

.bb-chip-shift {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 8px;
    border-radius: 10px;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.7);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.15);
}

.bb-chip-shift.is-pending {
    background: rgba(248, 113, 113, 0.08);
    border-color: rgba(248, 113, 113, 0.7);
}

.bb-chip-time {
    font-weight: 600;
    font-size: 12px;
    color: var(--bb-text-main);
}

.bb-chip-role {
    font-size: 11px;
    color: var(--bb-text-soft);
}


/* ======= pentru plus ======= */

.bb-week-cell-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 4px;
}

.bb-add-shift-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 1px dashed rgba(148, 163, 184, 0.9);
    font-size: 13px;
    line-height: 1;
    color: var(--bb-text-muted);
    text-decoration: none;
    background: rgba(249, 250, 251, 0.8);
    transition:
        border-color 0.15s ease,
        background 0.15s ease,
        color 0.15s ease,
        transform 0.12s ease;
}

.bb-add-shift-link:hover {
    border-style: solid;
    border-color: var(--bb-accent-strong);
    color: var(--bb-accent-strong);
    background: var(--bb-accent-soft);
    transform: translateY(-1px);
}

.bb-add-shift-link:active {
    transform: translateY(0);
    background: var(--bb-accent);
    color: #1f2933;
    border-color: var(--bb-accent);
}

button.bb-add-shift-link:hover,
a.bb-add-shift-link:hover {
    /* același conținut ca .bb-add-shift-link:hover */
}





/* === Centrează vertical și orizontal conținutul celulelor === */
.bb-week-cell-inner {
    display: flex;
    flex-direction: column;
    align-items: center;       /* orizontal */
    justify-content: center;   /* vertical */
    height: 100%;
    padding: 6px 8px;
}

/* wrapper-ul pentru Liber + plus */
.bb-free-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* centrează textul chip-urilor */
.bb-chip-shift {
    text-align: center;
}

.bb-add-shift-form {
    margin: 0;
}


.bb-week-cell {
    position: relative;
    overflow: hidden;
}

.bb-free-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bb-add-shift-form {
    margin-top: 4px;
}

.bb-chip-shift{
  position: relative;
}

/* overlay full */
.bb-chip-delete-form{
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6;
}

/* buton X */
.bb-chip-delete-btn{
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: #d32f2f;
  color: #fff;
  font-size: 24px;
  line-height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(0,0,0,.25);
}

/* hover doar pe desktop */
@media (hover: hover){
  .bb-chip-delete-btn:hover{
    background: #b71c1c;
  }
}

/* mascare text fără resize */
.bb-chip-shift.is-editing .bb-chip-time,
.bb-chip-shift.is-editing .bb-chip-role{
  opacity: 0;
}

/* overlay roșu subtil */
.bb-chip-shift.is-editing::after{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(211,47,47,.15);
  z-index: 5;
}



/* BUTON SALVEAZA EDITEAZA */
.bb-btn {
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* 🔴 */
.bb-btn-danger {
  background: #d32f2f;
  color: #fff;
}

.bb-btn-danger:hover {
  background: #b71c1c;
}

/* 🟢 */
.bb-btn-success {
  background: #2e7d32;
  color: #fff;
}

.bb-btn-success:hover {
  background: #1b5e20;
}