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

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --success: #16a34a;
    --success-light: #f0fdf4;
    --warning: #d97706;
    --danger: #dc2626;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --radius: 8px;
    --radius-sm: 6px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--gray-900);
    background: var(--gray-50);
    line-height: 1.5;
    font-size: 15px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px;
    width: 100%;
}

.container--wide {
    max-width: 1080px;
}

.site-header {
    background: var(--gray-900);
    color: white;
    padding: 12px 0;
}

.site-header .container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
}

.header-section {
    color: var(--gray-300);
    font-size: 0.85rem;
}

.header-link {
    color: var(--gray-300);
    text-decoration: none;
    font-size: 0.82rem;
    margin-left: auto;
    transition: color 0.15s;
}

.header-link:hover {
    color: white;
}

.main-content {
    flex: 1;
    padding: 28px 0;
}

.site-footer {
    background: var(--gray-100);
    border-top: 1px solid var(--gray-200);
    padding: 18px 0;
    text-align: center;
    color: var(--gray-500);
    font-size: 0.82rem;
}

.hero {
    text-align: center;
    padding: 44px 0 28px;
}

.hero-icon {
    font-size: 2.8rem;
    margin-bottom: 10px;
}

.hero h1 {
    font-size: 1.9rem;
    margin-bottom: 6px;
    color: var(--primary);
}

.hero-subtitle {
    color: var(--gray-500);
    font-size: 1.05rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin: 28px 0;
}

.feature-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    border-radius: var(--radius);
    padding: 24px 20px 20px;
    box-shadow: var(--shadow);
    text-align: center;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.15s;
    border: 2px solid transparent;
}

.feature-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--primary-light);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.feature-card h3 {
    margin-bottom: 6px;
    font-size: 1.02rem;
    color: var(--gray-900);
}

.feature-card p {
    color: var(--gray-500);
    font-size: 0.87rem;
    line-height: 1.45;
    margin-bottom: 12px;
}

.feature-action {
    display: inline-block;
    color: var(--primary);
    font-size: 0.84rem;
    font-weight: 600;
    margin-top: auto;
}

.demo-notice {
    background: #fef9ee;
    border: 1px solid #fde68a;
    border-radius: var(--radius);
    padding: 14px 18px;
    text-align: center;
    color: #92400e;
    font-size: 0.87rem;
    margin-top: 20px;
}

.demo-link {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px dashed var(--gray-300);
    transition: border-color 0.15s;
}

.demo-link:hover {
    border-bottom-color: var(--primary);
}

.feedback-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 28px;
    max-width: 600px;
    margin: 0 auto;
}

.feedback-card h1 {
    font-size: 1.35rem;
    margin-bottom: 14px;
}

.feedback-info {
    color: var(--gray-500);
    font-size: 0.87rem;
    margin-bottom: 4px;
}

.feedback-form {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.92rem;
}

.form-hint {
    color: var(--gray-500);
    font-size: 0.8rem;
    margin-bottom: 6px;
}

.required {
    color: var(--danger);
}

.form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    background: white;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

textarea.form-control {
    resize: vertical;
}

.rating-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.rating-btn {
    cursor: pointer;
}

.rating-btn input {
    display: none;
}

.rating-btn span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all 0.15s;
}

.rating-btn input:checked + span {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.rating-btn:hover span {
    border-color: var(--primary);
}

.btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s, border-color 0.15s;
    text-decoration: none;
    line-height: 1.4;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
}

.btn-outline {
    background: white;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 0.78rem;
}

.feedback-success,
.feedback-expired,
.feedback-error-card {
    text-align: center;
    padding: 44px 28px;
}

.success-icon {
    font-size: 2.8rem;
    color: var(--success);
    margin-bottom: 10px;
}

.expired-icon {
    font-size: 2.8rem;
    color: var(--warning);
    margin-bottom: 10px;
}

.error-icon {
    font-size: 2.8rem;
    color: var(--danger);
    margin-bottom: 10px;
}

.feedback-success h1 {
    color: var(--success);
}

.feedback-expired h1 {
    color: var(--warning);
}

.feedback-error-card h1 {
    color: var(--danger);
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.admin-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.mode-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.mode-current {
    color: var(--gray-500);
    font-size: 0.85rem;
}

.mode-form {
    display: flex;
    gap: 4px;
}

.mode-option {
    cursor: pointer;
}

.mode-option input {
    display: none;
}

.mode-label {
    display: inline-block;
    padding: 5px 14px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: capitalize;
    transition: all 0.15s;
    background: white;
}

.mode-active .mode-label {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.mode-label:hover {
    border-color: var(--primary);
}

.feedback-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
}

.fb-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 20px;
    border-left: 3px solid var(--gray-300);
}

.fb-card--answered {
    border-left-color: var(--success);
    background: #fafffe;
}

.fb-card--pending {
    border-left-color: var(--warning);
    background: #fffefb;
}

.fb-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 0.88rem;
    margin-bottom: 10px;
}

.fb-date {
    font-weight: 600;
    color: var(--gray-700);
    white-space: nowrap;
}

.fb-employee {
    color: var(--gray-900);
    font-weight: 500;
}

.fb-duration {
    color: var(--gray-500);
    font-size: 0.82rem;
}

.fb-phone {
    color: var(--gray-700);
    font-size: 0.85rem;
    word-break: break-all;
}

.fb-record-btn {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.15s;
    margin-left: auto;
}

.fb-record-btn:hover {
    background: var(--primary);
    color: white;
}

.fb-answers {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px 16px;
    padding-top: 8px;
    border-top: 1px solid var(--gray-100);
}

.fb-answer-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fb-answer-row--full {
    grid-column: 1 / -1;
}

.fb-answer-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.fb-answer-value {
    font-size: 0.88rem;
    color: var(--gray-900);
    word-break: break-word;
}

.fb-no-answer {
    color: var(--gray-500);
    font-size: 0.85rem;
    font-style: italic;
    padding-top: 6px;
}

.fb-empty {
    text-align: center;
    color: var(--gray-500);
    padding: 40px 0;
    font-size: 0.95rem;
}

.tech-details {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px 20px;
    margin-bottom: 12px;
}

.tech-details summary {
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    color: var(--gray-700);
    padding: 4px 0;
    user-select: none;
}

.tech-details summary:hover {
    color: var(--primary);
}

.diag-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

.diag-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.diag-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.diag-ok {
    background: var(--success);
}

.diag-warn {
    background: var(--warning);
}

.diag-err {
    background: var(--danger);
}

.diag-label {
    color: var(--gray-500);
    min-width: 90px;
}

.diag-value {
    font-weight: 600;
}

.ssh-hint {
    color: var(--gray-500);
    font-size: 0.82rem;
    margin: 10px 0;
}

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

.ssh-cmd {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
    flex-wrap: wrap;
}

.ssh-cmd code {
    font-size: 0.8rem;
    background: var(--gray-100);
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    overflow-x: auto;
    flex-shrink: 1;
    min-width: 0;
}

.ssh-desc {
    color: var(--gray-500);
    font-size: 0.8rem;
    flex: 1;
    min-width: 100px;
}

.copy-btn {
    flex-shrink: 0;
}

/* ===== LANDING PAGE ===== */

body.landing-page {
    background:
        radial-gradient(circle at 20% 10%, rgba(14, 165, 233, 0.25), transparent 32rem),
        radial-gradient(circle at 85% 18%, rgba(132, 204, 22, 0.15), transparent 28rem),
        linear-gradient(135deg, #0f172a 0%, #111827 42%, #1e293b 100%);
    color: #f8fafc;
    background-attachment: fixed;
}

body.landing-page .site-header {
    background: rgba(15, 23, 42, 0.92);
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
    position: relative;
    z-index: 10;
}

body.landing-page .main-content {
    padding: 0;
}

body.landing-page .main-content > .container {
    max-width: none;
    padding: 0;
    width: 100%;
}

body.landing-page .site-footer {
    background: rgba(15, 23, 42, 0.6);
    border-top: 1px solid rgba(148, 163, 184, 0.08);
    color: #475569;
}

.landing-shell {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}

.landing-hero {
    padding: 48px 0 32px;
    position: relative;
    overflow: hidden;
}

.landing-hero::before {
    content: '';
    position: absolute;
    top: -60%;
    left: -10%;
    width: 55%;
    height: 100%;
    background: radial-gradient(ellipse, rgba(14, 165, 233, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.landing-hero::after {
    content: '';
    position: absolute;
    bottom: -40%;
    right: -5%;
    width: 45%;
    height: 80%;
    background: radial-gradient(ellipse, rgba(132, 204, 22, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

body.landing-page .hero-panel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 480px);
    align-items: center;
    gap: 48px;
}

body.landing-page .hero-copy h1 {
    font-size: 2.6rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 6px;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

body.landing-page .hero-eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 999px;
    padding: 4px 14px;
    margin-bottom: 18px;
}

body.landing-page .hero-lead {
    font-size: 1.15rem;
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 6px;
}

body.landing-page .hero-text {
    font-size: 0.92rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 0;
}
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

body.landing-page .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

body.landing-page .btn-primary {
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}

body.landing-page .btn-primary:hover {
    box-shadow: 0 6px 24px rgba(37, 99, 235, 0.45);
    transform: translateY(-1px);
}

body.landing-page .btn-secondary {
    background: rgba(30, 41, 59, 0.8);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

body.landing-page .btn-secondary:hover {
    color: #ffffff;
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(30, 41, 59, 1);
}

body.landing-page .subtle-link {
    display: inline-block;
    color: #475569;
    font-size: 0.82rem;
    text-decoration: none;
    border-bottom: 1px dashed #334155;
    transition: color 0.15s, border-color 0.15s;
}

body.landing-page .subtle-link:hover {
    color: #94a3b8;
    border-bottom-color: #94a3b8;
}

body.landing-page .hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

body.landing-page .mascot-frame {
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 28px;
    padding: 16px;
    box-shadow:
        0 8px 40px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.landing-page .mascot-frame img {
    width: 100%;
    height: auto;
    max-width: 430px;
    display: block;
    border-radius: 18px;
}

.landing-features {
    padding: 36px 0 32px;
    position: relative;
}

.landing-features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.12), transparent);
}

body.landing-page .feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

body.landing-page .feature-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 20px;
    padding: 28px 22px 22px;
    text-align: center;
    text-decoration: none;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.landing-page .feature-card:hover {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(56, 189, 248, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

body.landing-page .feature-card .feature-icon {
    font-size: 2.2rem;
    margin-bottom: 12px;
}

body.landing-page .feature-card h3 {
    color: #f1f5f9;
    font-size: 1.05rem;
    margin-bottom: 8px;
}

body.landing-page .feature-card p {
    color: #94a3b8;
    font-size: 0.87rem;
    line-height: 1.5;
    margin-bottom: 14px;
}

body.landing-page .feature-action {
    color: #38bdf8;
    font-size: 0.84rem;
    font-weight: 700;
    margin-top: auto;
}

body.landing-page .landing-notice {
    padding: 12px 20px;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 12px;
    text-align: center;
    color: #64748b;
    font-size: 0.84rem;
}

/* ===== MEDIA QUERIES ===== */

@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .mode-inline {
        width: 100%;
    }

    .fb-card-header {
        gap: 8px;
    }

    .fb-record-btn {
        margin-left: 0;
    }

    .fb-answers {
        grid-template-columns: 1fr;
    }

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

    .ssh-cmd {
        flex-direction: column;
        align-items: flex-start;
    }

    .ssh-cmd code {
        width: 100%;
        white-space: normal;
        word-break: break-all;
    }

    .ssh-desc {
        width: 100%;
    }

    .copy-btn {
        align-self: flex-end;
    }

    body.landing-page .hero-panel {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }

    body.landing-page .hero-copy h1 {
        font-size: 2rem;
    }

    body.landing-page .hero-actions {
        justify-content: center;
    }

    body.landing-page .mascot-frame {
        padding: 12px;
    }

    body.landing-page .mascot-frame img {
        max-width: 280px;
        margin: 0 auto;
    }

    body.landing-page .hero-eyebrow {
        margin-bottom: 12px;
    }

    body.landing-page .feature-grid {
        grid-template-columns: 1fr;
    }

    body.landing-page .landing-shell {
        width: calc(100% - 32px);
    }
}

@media (max-width: 640px) {
    body {
        font-size: 14px;
    }

    .feedback-card {
        padding: 18px 14px;
    }

    .rating-btn span {
        width: 34px;
        height: 34px;
        font-size: 0.82rem;
    }

    .mode-label {
        padding: 4px 10px;
        font-size: 0.75rem;
    }

    .container {
        padding: 0 12px;
    }

    body.landing-page .landing-hero {
        padding: 36px 0 28px;
    }

    body.landing-page .hero-copy h1 {
        font-size: 1.7rem;
    }

    body.landing-page .hero-lead {
        font-size: 1rem;
    }

    body.landing-page .btn {
        min-height: 40px;
        padding: 0 18px;
        font-size: 0.85rem;
    }

    body.landing-page .mascot-frame img {
        max-width: 220px;
    }

    body.landing-page .landing-features {
        padding: 24px 0 20px;
    }

    body.landing-page .feature-card {
        padding: 20px 16px 16px;
    }
}
