:root {
    /* Roast & crema — warm coffee ERP palette */
    --nsc-bg: #f3ebe4;
    --nsc-bg-accent: #ebe2d8;
    --nsc-surface: #fffdf9;
    --nsc-elevated: #faf6f1;
    --nsc-fg: #2a1a12;
    --nsc-muted: #6b5a50;
    --nsc-border: #e0d3c8;
    --nsc-espresso: #4a2f1f;
    --nsc-espresso-hover: #3d2618;
    --nsc-milk: #fffaf5;
    --nsc-crema: #c9955c;
    --nsc-crema-soft: #e8c9a4;
    --nsc-accent: #b86b2b;
    --nsc-accent-soft: rgba(184, 107, 43, 0.12);
    --nsc-font: "Inter", system-ui, -apple-system, sans-serif;
    --nsc-font-display: "Fraunces", Georgia, "Times New Roman", serif;
    --nsc-radius-sm: 0.45rem;
    --nsc-radius-md: 0.65rem;
    --nsc-radius-lg: 0.9rem;
    --nsc-shadow-card: 0 4px 20px rgba(58, 38, 24, 0.06);
    --nsc-shadow-btn: 0 2px 8px rgba(42, 26, 18, 0.12);
    /* Align Bootstrap with our radii */
    --bs-border-radius: var(--nsc-radius-md);
    --bs-border-radius-sm: var(--nsc-radius-sm);
    --bs-border-radius-lg: var(--nsc-radius-lg);
}

.nsc-body {
    font-family: var(--nsc-font);
    margin: 0;
    background: var(--nsc-bg);
    color: var(--nsc-fg);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

.modal-content {
    border-radius: var(--nsc-radius-lg);
    border-color: var(--nsc-border);
}

.nsc-password-wrap {
    position: relative;
}

.nsc-password-wrap .form-control {
    padding-right: 2.85rem;
}

.nsc-password-toggle-btn {
    position: absolute;
    right: 0.2rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--nsc-muted);
    cursor: pointer;
    border-radius: var(--nsc-radius-sm);
}

.nsc-password-toggle-btn:hover {
    color: var(--nsc-fg);
    background: rgba(0, 0, 0, 0.06);
}

.nsc-password-toggle-btn:focus-visible {
    outline: 2px solid var(--nsc-fg);
    outline-offset: 2px;
}

.nsc-password-toggle-btn .nsc-eye-svg {
    width: 22px;
    height: 22px;
    display: block;
}

.nsc-muted {
    color: var(--nsc-muted);
    font-size: 0.9rem;
}

.nsc-link {
    color: var(--nsc-espresso);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: var(--nsc-crema-soft);
}

.nsc-link:hover {
    color: var(--nsc-accent);
    text-decoration-color: var(--nsc-accent);
}

.nsc-h1 {
    font-family: var(--nsc-font-display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 1rem;
}

.nsc-card {
    background: var(--nsc-surface);
    border: 1px solid var(--nsc-border);
    border-radius: var(--nsc-radius-lg);
    box-shadow: var(--nsc-shadow-card);
    padding: 1rem 1rem 1.1rem;
    margin-bottom: 1rem;
}

.nsc-card-title {
    font-family: var(--nsc-font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--nsc-muted);
    margin: 0 0 0.75rem;
    padding-bottom: 0.45rem;
    border-bottom: 2px solid var(--nsc-crema);
}

.nsc-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--nsc-muted);
    margin-bottom: 0.2rem;
    display: block;
}

.nsc-form-row {
    margin-bottom: 0.85rem;
}

.nsc-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.85rem 1rem;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    border-radius: var(--nsc-radius-md);
    background: linear-gradient(165deg, var(--nsc-espresso) 0%, #3d2618 100%);
    color: var(--nsc-milk);
    cursor: pointer;
    margin-top: 0.5rem;
    box-shadow: var(--nsc-shadow-btn);
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.nsc-btn-primary:hover:not(:disabled) {
    filter: brightness(1.06);
    box-shadow: 0 3px 12px rgba(42, 26, 18, 0.18);
}

.nsc-btn-primary:active:not(:disabled) {
    transform: translateY(1px);
}

.nsc-btn-primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.nsc-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.9rem;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid var(--nsc-border);
    border-radius: var(--nsc-radius-md);
    background: var(--nsc-surface);
    color: var(--nsc-fg);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.nsc-btn-secondary:hover {
    background: var(--nsc-elevated);
    border-color: var(--nsc-crema-soft);
}

.nsc-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: stretch;
    margin-top: 0.75rem;
}

.nsc-form-actions .nsc-btn-form-pair {
    flex: 1 1 0;
    min-width: 140px;
    max-width: 100%;
    margin-top: 0;
    width: auto;
    box-sizing: border-box;
    min-height: 44px;
}

.nsc-form-actions .nsc-btn-primary.nsc-btn-form-pair {
    padding: 0.55rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.nsc-filter-toggle-btn {
    position: relative;
    gap: 0.35rem;
}

.nsc-filter-active-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-left: 0.25rem;
    border-radius: 50%;
    background: var(--nsc-accent);
    vertical-align: middle;
    box-shadow: 0 0 0 2px var(--nsc-crema-soft);
}

.nsc-visits-row {
    cursor: pointer;
}

.nsc-visits-row:hover {
    background: var(--nsc-elevated);
}

.nsc-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--nsc-radius-sm);
}

.nsc-table {
    width: 100%;
    font-size: 0.82rem;
    border-collapse: collapse;
}

.nsc-table th,
.nsc-table td {
    border: 1px solid var(--nsc-border);
    padding: 0.45rem 0.35rem;
    text-align: left;
}

.nsc-table th {
    background: var(--nsc-elevated);
    font-weight: 600;
    white-space: nowrap;
}

.form-control,
.form-select {
    border-radius: var(--nsc-radius-md);
    border-color: var(--nsc-border);
    min-height: 44px;
    font-size: 1rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--nsc-crema);
    box-shadow: 0 0 0 0.2rem var(--nsc-accent-soft);
}

.btn {
    border-radius: var(--nsc-radius-md);
}

.btn-sm {
    border-radius: var(--nsc-radius-sm);
}

.btn-danger {
    --bs-btn-bg: #a53c30;
    --bs-btn-border-color: #8f3429;
    --bs-btn-hover-bg: #922f25;
    --bs-btn-hover-border-color: #7a281f;
}

.btn-outline-secondary {
    --bs-btn-color: var(--nsc-fg);
    --bs-btn-border-color: var(--nsc-border);
    --bs-btn-hover-bg: var(--nsc-elevated);
    --bs-btn-hover-border-color: var(--nsc-crema-soft);
    --bs-btn-hover-color: var(--nsc-fg);
}

a.nsc-btn-primary {
    color: var(--nsc-milk);
}

a.nsc-btn-primary:hover {
    color: var(--nsc-milk);
    filter: brightness(1.06);
}

.form-select-sm,
.form-control-sm {
    min-height: 40px;
    font-size: 0.9rem;
}

textarea.form-control {
    min-height: 100px;
}

.nsc-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--nsc-espresso);
    color: var(--nsc-milk);
    padding: 0.2rem 0.45rem;
    border-radius: var(--nsc-radius-sm);
}

.nsc-group-grid {
    display: grid;
    gap: 0.75rem;
}

@media (min-width: 576px) {
    .nsc-group-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.nsc-alert {
    padding: 0.65rem 0.85rem;
    background: #fff3cd;
    border: 1px solid #856404;
    color: #533f03;
    font-size: 0.88rem;
    margin-bottom: 1rem;
}

html, body {
    font-family: var(--nsc-font);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.nsc-home-hero {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--nsc-border);
}

.nsc-home-title {
    font-family: var(--nsc-font-display);
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 0.5rem;
    color: var(--nsc-fg);
    line-height: 1.2;
}

.nsc-home-lead {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--nsc-muted);
    max-width: 42rem;
}

.nsc-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.nsc-card-title-inline {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.nsc-filters-heading {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--nsc-muted);
    margin: 0 0 0.65rem;
}

.nsc-btn-new-visit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-weight: 700;
    font-size: 0.82rem;
    text-decoration: none;
    color: var(--nsc-milk);
    background: linear-gradient(135deg, var(--nsc-accent) 0%, #9a5520 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--nsc-radius-md);
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(154, 85, 32, 0.35);
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.nsc-btn-new-visit:hover {
    color: var(--nsc-milk);
    filter: brightness(1.05);
    box-shadow: 0 4px 14px rgba(154, 85, 32, 0.45);
}

.nsc-visits-card .nsc-card-title {
    margin: 0;
    padding: 0;
    border: none;
}

.nsc-customer-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 640px) {
    .nsc-customer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.nsc-customer-card {
    margin-bottom: 0;
}

.nsc-customer-name {
    font-family: var(--nsc-font-display);
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
    color: var(--nsc-fg);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--nsc-crema);
}

.nsc-customer-dl {
    margin: 0;
}

.nsc-customer-dl > div {
    display: grid;
    grid-template-columns: 7rem 1fr;
    gap: 0.35rem 0.75rem;
    font-size: 0.88rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--nsc-border);
}

.nsc-customer-dl > div:last-child {
    border-bottom: none;
}

.nsc-customer-dl dt {
    margin: 0;
    font-weight: 600;
    color: var(--nsc-muted);
}

.nsc-customer-dl dd {
    margin: 0;
    color: var(--nsc-fg);
}

/* Header nav: override Bootstrap default link (blue / underline) */
header.nsc-header .nsc-nav-shell a.nsc-nav-link,
header.nsc-header .nsc-nav-panel a.nsc-nav-link {
    color: var(--nsc-fg) !important;
    text-decoration: none !important;
}

header.nsc-header .nsc-nav-shell a.nsc-nav-link:visited,
header.nsc-header .nsc-nav-panel a.nsc-nav-link:visited {
    color: var(--nsc-fg) !important;
}

header.nsc-header .nsc-nav-shell a.nsc-nav-link:hover,
header.nsc-header .nsc-nav-panel a.nsc-nav-link:hover {
    color: var(--nsc-fg) !important;
    text-decoration: none !important;
}

header.nsc-header .nsc-nav-shell a.nsc-nav-link.active:hover,
header.nsc-header .nsc-nav-panel a.nsc-nav-link.active:hover {
    background-color: transparent !important;
    text-decoration: underline !important;
}

header.nsc-header .nsc-nav-shell a.nsc-nav-link.active,
header.nsc-header .nsc-nav-panel a.nsc-nav-link.active {
    color: var(--nsc-espresso) !important;
    background-color: transparent !important;
    border-color: transparent !important;
    font-weight: 700;
    text-decoration: underline !important;
    text-underline-offset: 0.25em;
    text-decoration-thickness: 2px;
    text-decoration-color: var(--nsc-crema);
}

.nsc-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid var(--nsc-border);
    background: var(--nsc-surface);
    color: var(--nsc-fg);
    text-decoration: none !important;
    vertical-align: middle;
    cursor: pointer;
    border-radius: var(--nsc-radius-sm);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.nsc-icon-btn:hover {
    background: var(--nsc-elevated);
    color: var(--nsc-fg);
    border-color: var(--nsc-crema-soft);
}

.nsc-icon-btn--danger:hover {
    border-color: #842029;
    color: #842029;
    background: #f8d7da;
}

.nsc-icon-svg {
    width: 18px;
    height: 18px;
    display: block;
}

.nsc-th-actions,
.nsc-td-actions {
    white-space: nowrap;
    vertical-align: middle;
    width: 1%;
    /* Χώρος για προεπισκόπηση + PDF + επεξεργασία + διαγραφή (4 compact κουμπιά) */
    min-width: 10.5rem;
    max-width: 14rem;
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
}

.nsc-th-actions {
    text-align: center;
    font-size: 0.7rem;
    letter-spacing: 0.02em;
}

.nsc-td-actions {
    text-align: center;
}

.nsc-td-actions .nsc-icon-btn {
    margin-left: 0;
    margin-right: 0.15rem;
}

.nsc-td-actions .nsc-icon-btn:last-child {
    margin-right: 0;
}

/* Service: μόνο 2 εικονίδια (ή 1 προβολή) — στενότερη στήλη από Checklists (4 κουμπιά) */
.nsc-th-actions--compact,
.nsc-td-actions--compact {
    min-width: 4.75rem;
    max-width: 5.75rem;
    padding-left: 0.2rem !important;
    padding-right: 0.2rem !important;
}

.nsc-td-machine {
    max-width: 10rem;
    font-size: 0.78rem;
    word-break: break-word;
}

.nsc-icon-btn--compact {
    width: 1.95rem;
    height: 1.95rem;
    min-width: 1.95rem;
}

.nsc-icon-svg-colored {
    width: 18px;
    height: 18px;
    display: block;
}

.nsc-icon-btn--danger-outline {
    border-color: #f5c2c7;
    background: #fff5f5;
}

.nsc-icon-btn--danger-outline:hover {
    border-color: #c62828;
    background: #ffebee;
}

.nsc-delete-modal {
    z-index: 1055;
}

.nsc-delete-modal-backdrop {
    z-index: 1050;
}

.nsc-link-inline {
    font-size: 0.78rem;
    vertical-align: middle;
}

.nsc-customer-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.nsc-customer-card-head .nsc-customer-name {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.nsc-customer-actions {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}

.nsc-customers-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Στήλη flex: το στοιχείο τεντώνεται πλάτος — το κουμπί «Νέος πελάτης» να μείνει στο περιεχόμενο */
.nsc-customers-toolbar > .nsc-btn-new-visit {
    align-self: flex-start;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 575.98px) {
    .nsc-customers-toolbar > .nsc-btn-new-visit {
        padding: 0.35rem 0.65rem;
        font-size: 0.76rem;
        line-height: 1.25;
    }
}

@media (min-width: 576px) {
    .nsc-customers-toolbar {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.75rem 1rem;
    }

    .nsc-customers-toolbar .nsc-search-wrap {
        flex: 1;
        min-width: 12rem;
    }
}

.nsc-search-wrap {
    width: 100%;
}

.nsc-search-input {
    max-width: 100%;
}

.nsc-form-actions-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.5rem;
    margin-top: 1rem;
    align-items: stretch;
}

.nsc-form-actions-row .nsc-btn-primary.nsc-btn-pair,
.nsc-form-actions-row a.nsc-btn-secondary.nsc-btn-pair {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    max-width: none;
    margin-top: 0 !important;
    padding: 0.55rem 0.75rem;
    font-size: 0.88rem;
    font-weight: 600;
    text-align: center;
    justify-content: center;
}

.nsc-form-actions-row .nsc-btn-primary.nsc-btn-pair {
    font-weight: 700;
}

.nsc-page-size-select {
    width: auto;
    min-width: 4.5rem;
    display: inline-block;
}

.nsc-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--nsc-border);
}

.nsc-pagination-info {
    font-size: 0.82rem;
    color: var(--nsc-muted);
    text-align: center;
    flex: 1 1 auto;
    min-width: 10rem;
}

.nsc-dashboard-pager .nsc-pager-arrow {
    min-width: 2.35rem;
    min-height: 2rem;
    padding: 0.25rem 0.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nsc-pager-chevron {
    width: 1.15rem;
    height: 1.15rem;
    flex-shrink: 0;
    display: block;
}

/* Checklist selects: κενό = λευκό, καθαρό = πράσινο, μέτριο = μπλε, βρώμικο = κόκκινο */
.nsc-status-select.nsc-sel-empty {
    background-color: #fff !important;
    color: var(--nsc-fg);
    border-color: var(--nsc-border) !important;
}

.nsc-status-select.nsc-sel-clean-3 {
    background-color: #d4edda !important;
    border-color: #155724 !important;
    color: #0f5132;
}

.nsc-status-select.nsc-sel-medium-3 {
    background-color: #cfe2ff !important;
    border-color: #084298 !important;
    color: #052c65;
}

.nsc-status-select.nsc-sel-dirty-3 {
    background-color: #f8d7da !important;
    border-color: #842029 !important;
    color: #58151c;
}

.nsc-status-select.nsc-sel-clean-2 {
    background-color: #d4edda !important;
    border-color: #155724 !important;
    color: #0f5132;
}

.nsc-status-select.nsc-sel-dirty-2 {
    background-color: #f8d7da !important;
    border-color: #842029 !important;
    color: #58151c;
}

.nsc-status-pill {
    display: inline-block;
    padding: 0.12rem 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid;
    border-radius: 999px;
}

.nsc-status-pill.nsc-sel-clean-3,
.nsc-status-pill.nsc-sel-clean-2 {
    background: #d4edda;
    border-color: #155724;
    color: #0f5132;
}

.nsc-status-pill.nsc-sel-medium-3 {
    background: #cfe2ff;
    border-color: #084298;
    color: #052c65;
}

.nsc-status-pill.nsc-sel-dirty-3,
.nsc-status-pill.nsc-sel-dirty-2 {
    background: #f8d7da;
    border-color: #842029;
    color: #58151c;
}
