* {
    box-sizing: border-box;
}

:root {
    --bg: #f4f6fb;
    --surface: #ffffff;
    --surface-soft: #f8f9fd;
    --text: #182033;
    --muted: #6e7585;
    --border: #e4e8f0;
    --primary: #2E7D32;
    --primary-dark: #81C784;
    --primary-soft: #eeedff;
    --available: #1d8058;
    --available-bg: #eaf7f1;
    --progress: #a26709;
    --progress-bg: #fff5df;
    --pending: #687083;
    --pending-bg: #eef0f4;
    --danger: #b42318;
    --danger-bg: #fff0ef;
    --shadow: 0 14px 36px rgba(26, 32, 48, 0.07);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top right, rgba(80, 70, 229, 0.08), transparent 32rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

button,
input,
select,
textarea {
    font: inherit;
}

.site-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0 28px;
}

.hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
}

.brand {
    min-height: 58px;
    display: flex;
    align-items: center;
}

.brand-logo {
    display: block;
    max-width: 220px;
    max-height: 64px;
    width: auto;
    height: auto;
}

.brand-placeholder {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--primary);
}

.hero-copy {
    max-width: 760px;
}

.eyebrow,
.section-caption {
    margin: 0 0 7px;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

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

h1 {
    margin-bottom: 12px;
    font-size: clamp(2rem, 5vw, 3.7rem);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

h2 {
    margin-bottom: 8px;
    font-size: clamp(1.45rem, 3vw, 2.05rem);
    letter-spacing: -0.03em;
}

h3 {
    margin-bottom: 4px;
    font-size: 1.07rem;
}

.hero-description {
    margin-bottom: 0;
    max-width: 680px;
    color: var(--muted);
    font-size: 1.04rem;
}

.overall-card {
    margin-top: 12px;
    padding: clamp(22px, 4vw, 34px);
    border: 1px solid rgba(80, 70, 229, 0.14);
    border-radius: 26px;
    background: linear-gradient(135deg, var(--surface), #f7f6ff);
    box-shadow: var(--shadow);
}

.overall-heading,
.card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.overall-heading strong {
    display: block;
    font-size: clamp(2rem, 5vw, 3.3rem);
    line-height: 1;
    letter-spacing: -0.05em;
}

.overall-status,
.group-state {
    color: var(--muted);
    font-size: 0.87rem;
    font-weight: 650;
}

.overall-status {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255,255,255,.72);
}

.progress-track {
    width: 100%;
    height: 8px;
    margin: 17px 0;
    overflow: hidden;
    border-radius: 999px;
    background: #e8eaf2;
}

.progress-track-large {
    height: 13px;
    margin: 22px 0 16px;
}

.progress-value {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), #81C784);
    transition: width 300ms ease;
}

.overall-message,
.group-message {
    color: var(--muted);
}

.overall-message {
    max-width: 760px;
    margin-bottom: 8px;
}

.last-update {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.84rem;
}

.services-section {
    padding: 64px 0 0;
}

.section-heading {
    margin-bottom: 22px;
}

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

.service-card {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 9px 24px rgba(26, 32, 48, 0.04);
}

.percentage {
    flex: 0 0 auto;
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.group-message {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--surface-soft);
    font-size: 0.9rem;
}

.service-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.service-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.service-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.service-name {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 0.93rem;
    font-weight: 620;
}

.status-badge {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 750;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.status-available {
    color: var(--available);
    background: var(--available-bg);
}

.status-progress {
    color: var(--progress);
    background: var(--progress-bg);
}

.status-pending {
    color: var(--pending);
    background: var(--pending-bg);
}

.empty-state {
    margin-bottom: 0;
    padding: 17px;
    border: 1px dashed var(--border);
    border-radius: 14px;
    color: var(--muted);
    background: var(--surface-soft);
    font-size: 0.9rem;
}

.migration-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-top: 54px;
    padding: clamp(24px, 5vw, 38px);
    border-radius: 24px;
    color: white;
    background: #263238;
}



.migration-copy {
    max-width: 730px;
}

.migration-copy p:last-child {
    margin-bottom: 0;
    color: #c9cbd5;
}

.primary-button,
.secondary-button,
.danger-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 11px;
    padding: 11px 17px;
    cursor: pointer;
    font-weight: 750;
    text-decoration: none;
}

.primary-button {
    color: white;
    background: var(--primary);
}

.primary-button:hover {
    background: var(--primary-dark);
}

.secondary-button {
    color: var(--text);
    border: 1px solid var(--border);
    background: white;
}

.danger-button {
    color: var(--danger);
    border: 1px solid #f1c4bf;
    background: var(--danger-bg);
}

footer {
    padding: 24px 0 0;
    color: var(--muted);
    font-size: 0.82rem;
    text-align: center;
}

/* ADMIN */
.admin-body {
    min-height: 100vh;
    background: var(--bg);
}

.admin-shell {
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 54px;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.admin-title {
    margin-bottom: 2px;
}

.admin-subtitle {
    margin-bottom: 0;
    color: var(--muted);
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.admin-card,
.login-card {
    border: 1px solid var(--border);
    border-radius: 20px;
    background: white;
    box-shadow: var(--shadow);
}

.admin-card {
    margin-bottom: 18px;
    padding: 23px;
}

.login-wrap {
    width: min(430px, calc(100% - 32px));
    margin: 12vh auto 0;
}

.login-card {
    padding: 30px;
}

.field-grid {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 16px;
}

.field {
    margin-bottom: 16px;
}

.field:last-child {
    margin-bottom: 0;
}

.field label {
    display: block;
    margin-bottom: 7px;
    font-size: 0.85rem;
    font-weight: 750;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    border: 1px solid #d8dce6;
    border-radius: 10px;
    padding: 10px 12px;
    outline: none;
    background: white;
    color: var(--text);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.field textarea {
    min-height: 78px;
    resize: vertical;
}

.group-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 18px;
}

.services-editor {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
}

.service-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid var(--border);
}

.service-row:last-child {
    border-bottom: 0;
}

.service-row input,
.service-row select {
    width: 100%;
    border: 1px solid #d8dce6;
    border-radius: 9px;
    padding: 9px 10px;
    background: white;
}

.remove-service {
    border: 0;
    border-radius: 9px;
    padding: 9px 11px;
    cursor: pointer;
    color: var(--danger);
    background: var(--danger-bg);
    font-weight: 700;
}

.add-service {
    margin-top: 12px;
}

.notice {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
}

.notice-success {
    color: #176341;
    background: #eaf7f1;
}

.notice-error {
    color: var(--danger);
    background: var(--danger-bg);
}

.admin-footer-actions {
    position: sticky;
    bottom: 14px;
    display: flex;
    justify-content: flex-end;
    margin-top: 22px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow);
}

.help-text {
    color: var(--muted);
    font-size: 0.82rem;
}

@media (max-width: 760px) {
    .site-shell,
    .admin-shell {
        width: min(100% - 22px, 100%);
    }

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

    .migration-card,
    .admin-topbar,
    .group-editor-header {
        align-items: stretch;
        flex-direction: column;
    }

    .migration-card .primary-button {
        width: 100%;
    }

    .field-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

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

    .admin-actions {
        width: 100%;
    }

    .admin-actions > * {
        flex: 1;
    }
}

.migration-inline{
    margin-top:24px;
    padding:18px 20px;

    background:#f7f9fc;

    border:1px solid var(--primary);

    border-radius:16px;
}

.migration-inline strong:first-child{

    display:block;

    margin-bottom:10px;

    font-size:1rem;

    color:#1d2939;
}

.migration-inline p{

    margin:0 0 12px;

    color:var(--muted);

    line-height:1.6;
}

.migration-inline .primary-button{

    background:white;

    color:var(--primary);

    border:1px solid rgba(46,125,50,.25);

    box-shadow:none;
}

.migration-inline .primary-button:hover{

    background:#eef8ef;
}

