/* G2D-M9F-SUPERVISOR-TOURS */
.supervisor-tours-page {
    width: 100%;
    padding: 24px;
    color: var(--text-primary, #1d2935);
}
.sv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}
.sv-header h1 {
    margin: 0 0 8px;
    font-size: 1.55rem;
}
.sv-header p {
    margin: 0;
    color: var(--text-muted, #667085);
}
.sv-refresh {
    padding: 11px 18px;
    border: 1px solid #d7dee5;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    font: inherit;
}
.sv-status {
    padding: 16px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e4e7ec;
    margin-bottom: 16px;
}
.sv-status[hidden], .sv-summary[hidden] { display: none; }
.sv-summary {
    margin-bottom: 18px;
    font-weight: 600;
}
.sv-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.sv-card {
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 14px;
    padding: 20px;
    min-width: 0;
}
.sv-card h2 {
    margin: 0 0 12px;
    font-size: 1.05rem;
    overflow-wrap: anywhere;
}
.sv-card dl { margin: 0; }
.sv-card dl div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
}
.sv-card dt { color: #667085; }
.sv-card dd { margin: 0; text-align: end; overflow-wrap: anywhere; }
@media (max-width: 640px) {
    .supervisor-tours-page { padding: 16px; }
    .sv-header { flex-direction: column; align-items: stretch; }
    .sv-refresh { width: 100%; }
    .sv-list { grid-template-columns: 1fr; }
}
/* G2D-12N1L-CREATE-FORM */
.sv-create-toolbar {
    display: flex;
    justify-content: flex-start;
    margin: 18px 0;
}

.sv-primary,
.sv-secondary {
    border: 0;
    border-radius: 10px;
    padding: 11px 18px;
    cursor: pointer;
    font: inherit;
}

.sv-primary {
    background: #17664d;
    color: #fff;
}

.sv-secondary {
    background: #edf3ef;
    color: #17563f;
}

.sv-create-panel {
    background: #fff;
    border: 1px solid #e0e8e2;
    border-radius: 16px;
    padding: 22px;
    margin: 18px 0;
}

.sv-form-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.sv-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.sv-form-grid label,
.sv-notes-label {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sv-create-panel input,
.sv-create-panel select,
.sv-create-panel textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 12px;
    border: 1px solid #d7e1da;
    border-radius: 9px;
    font: inherit;
    background: #fff;
    color: #24352d;
}

.sv-visit-row {
    display: grid;
    grid-template-columns: 95px minmax(130px, 1fr)
                           minmax(150px, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #edf0ed;
}

.sv-visit-controls {
    display: flex;
    gap: 5px;
}

.sv-visit-controls button {
    border: 1px solid #d7e1da;
    border-radius: 7px;
    background: #f7faf8;
    padding: 7px 10px;
    cursor: pointer;
}

.sv-notes-label {
    margin-top: 22px;
}

.sv-form-message {
    margin: 14px 0;
    color: #17664d;
}

.sv-form-message.sv-error {
    color: #a52c2c;
}

.sv-form-actions {
    display: flex;
    justify-content: flex-end;
}

.sv-primary:disabled {
    opacity: .55;
    cursor: not-allowed;
}

@media (max-width: 760px) {
    .sv-form-grid {
        grid-template-columns: 1fr;
    }

    .sv-visit-row {
        grid-template-columns: 1fr;
    }

    .sv-form-heading {
        flex-wrap: wrap;
    }
}

/* G2D-12N3G-UI — Supervisor Tour Detail Refinement */

#svTourDetails {
    --sv-ink: #10283a;
    --sv-muted: #718096;
    --sv-border: #e0e8ef;
    --sv-primary: #087451;
    --sv-soft: #f4f8fb;
    direction: rtl;
    background: #fff;
    border: 1px solid var(--sv-border);
    border-radius: 18px;
    padding: clamp(16px, 2vw, 28px);
    margin-top: 20px;
    box-shadow: 0 8px 28px rgba(16, 40, 58, .035);
    color: var(--sv-ink);
}

#svTourDetails[hidden] {
    display: none !important;
}

#svTourDetails .sv-form-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--sv-border);
}

#svTourDetails .sv-form-heading h2 {
    margin: 0 0 8px;
    font-size: clamp(18px, 2vw, 23px);
    font-weight: 800;
}

#svTourDetails .sv-form-heading p {
    margin: 0;
    color: var(--sv-muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}

#svTourDetails .sv-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    background: var(--sv-soft);
    border: 1px solid var(--sv-border);
    border-radius: 12px;
    padding: 14px 16px;
    margin: 0 0 22px;
    font-size: 13px;
    font-weight: 700;
}

#svTourDetails > h3 {
    font-size: 16px;
    margin: 0 0 14px;
    font-weight: 800;
}

#svTourDetails .sv-detail-visits {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
}

#svTourDetails .sv-detail-visits .sv-card {
    margin: 0;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--sv-border);
    border-radius: 14px;
    background: linear-gradient(180deg, #fff, #fbfdff);
    box-shadow: none;
}

#svTourDetails .sv-detail-visits .sv-card h3 {
    margin: 0 0 16px;
    font-size: 15px;
    font-weight: 800;
    color: var(--sv-ink);
}

#svTourDetails .sv-detail-visits dl {
    margin: 0;
    display: grid;
    gap: 0;
}

#svTourDetails .sv-detail-visits dl > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #edf1f5;
}

#svTourDetails .sv-detail-visits dl > div:last-child {
    border-bottom: 0;
}

#svTourDetails .sv-detail-visits dt {
    color: var(--sv-muted);
    font-size: 12px;
    flex-shrink: 0;
}

#svTourDetails .sv-detail-visits dd {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    overflow-wrap: anywhere;
}

#svTourDetails .sv-detail-close,
#svTourDetails .sv-detail-action {
    appearance: none;
    border: 1px solid var(--sv-border);
    background: #fff;
    color: var(--sv-ink);
    border-radius: 10px;
    padding: 11px 18px;
    min-height: 42px;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: background .15s ease,
                border-color .15s ease,
                transform .15s ease;
}

#svTourDetails .sv-detail-close:hover {
    background: #f1f5f9;
}

#svTourDetails .sv-detail-action {
    background: var(--sv-primary);
    border-color: var(--sv-primary);
    color: #fff;
}

#svTourDetails .sv-detail-action:hover {
    background: #075f43;
    border-color: #075f43;
}

#svTourDetails button:focus-visible {
    outline: 3px solid #79cdb1;
    outline-offset: 3px;
}

#svTourDetails button:disabled {
    opacity: .6;
    cursor: wait;
}

#svTourDetails .sv-form-actions {
    margin-top: 22px !important;
    padding-top: 18px;
    border-top: 1px solid var(--sv-border);
}

@media (max-width: 760px) {
    #svTourDetails .sv-detail-visits {
        grid-template-columns: 1fr;
    }

    #svTourDetails {
        padding: 16px;
        border-radius: 14px;
    }

    #svTourDetails .sv-detail-visits .sv-card {
        padding: 15px;
    }

    #svTourDetails .sv-detail-action {
        width: 100%;
    }

    #svTourDetails .sv-form-actions {
        display: grid !important;
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    #svTourDetails button {
        transition: none;
    }
}
#svTourDetails .sv-tour-progress {
    height: 8px;
    width: 100%;
    background: #e9f0f4;
    border-radius: 99px;
    overflow: hidden;
    margin: 0 0 20px;
}

#svTourDetails .sv-tour-progress-fill {
    height: 100%;
    background: #087451;
    border-radius: inherit;
    transition: width .25s ease;
}