/*
 * LEAP Comms Manager – Black Label Glass Interface (2025)
 * Design system tokens + component library for a premium glass aesthetic.
 */

/* -------------------- TOKENS -------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --font-family-base: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    --font-family-display: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;

    --color-bg-950: #030306;
    --color-bg-900: #06070c;
    --color-bg-800: rgba(9, 10, 18, 0.82);
    --color-surface-glass: rgba(14, 16, 26, 0.72);
    --color-surface-solid: rgba(13, 14, 22, 0.92);
    --color-surface-highlight: rgba(24, 10, 16, 0.75);

    --color-accent: #ff1a40;
    --color-accent-strong: #ff274d;
    --color-accent-soft: rgba(255, 26, 64, 0.24);
    --color-accent-glow: rgba(255, 26, 64, 0.55);

    --color-text-primary: #f7f8fc;
    --color-text-secondary: #c7cad6;
    --color-text-muted: #8c90a1;
    --color-text-invert: #040407;

    --color-success: #2ee8a4;
    --color-success-soft: rgba(46, 232, 164, 0.16);
    --color-warning: #ffb347;
    --color-warning-soft: rgba(255, 179, 71, 0.18);
    --color-danger: #ff4f64;
    --color-danger-soft: rgba(255, 79, 100, 0.18);

    --shadow-xxl: 0 20px 60px -30px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 16px 48px -28px rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 12px 32px -22px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 8px 20px -16px rgba(0, 0, 0, 0.45);
    --shadow-sm: 0 4px 12px -10px rgba(0, 0, 0, 0.4);

    --radius-xxl: 28px;
    --radius-xl: 24px;
    --radius-lg: 20px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --radius-xs: 8px;

    --border-glass: rgba(255, 255, 255, 0.12);
    --border-strong: rgba(255, 255, 255, 0.18);

    --transition-default: cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: var(--font-family-base);
    background:
        radial-gradient(circle at 12% 0%, rgba(255, 38, 72, 0.22), transparent 45%),
        radial-gradient(circle at 78% 4%, rgba(255, 38, 72, 0.12), transparent 46%),
        linear-gradient(160deg, var(--color-bg-950) 0%, var(--color-bg-900) 58%, #020203 100%);
    color: var(--color-text-primary);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.02), transparent 45%),
        linear-gradient(300deg, rgba(255, 26, 64, 0.04), transparent 55%);
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: -2;
    will-change: transform;
}

a {
    color: inherit;
    text-decoration: none;
}

/* -------------------- HEADER -------------------- */
.main-header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: rgba(7, 7, 12, 0.85);
    border-bottom: 1px solid rgba(255, 26, 64, 0.28);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    box-shadow: var(--shadow-md);
}

.main-header::after {
    content: "";
    position: absolute;
    inset: auto 24px 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 26, 64, 0.5), transparent);
}

.header-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.4rem 2.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.6rem;
    flex-wrap: nowrap;
}

.logo__link {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-image {
    height: 44px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 28px rgba(255, 26, 64, 0.35));
}


.user-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.user-email {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    font-weight: 400;
    letter-spacing: 0.01em;
}

.logout-btn {
    padding: 0.7rem 1.4rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    color: var(--color-text-primary);
    background: rgba(255, 26, 64, 0.15);
    border: 1px solid rgba(255, 26, 64, 0.3);
    transition: all 0.2s ease;
}

.logout-btn:hover,
.logout-btn:focus-visible {
    background: rgba(255, 26, 64, 0.25);
    border-color: rgba(255, 26, 64, 0.5);
    transform: translateY(-1px);
}

/* -------------------- LAYOUT -------------------- */
/* Page transition animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    max-width: 1280px;
    margin: 3.2rem auto 4.2rem;
    padding: 0 2.4rem;
    animation: slideDown 0.4s ease-out;
}

.page-header {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 2.6rem;
}

.page-title {
    font-family: var(--font-family-display);
    font-size: clamp(2rem, 2.6vw, 2.5rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-subtitle {
    color: var(--color-text-muted);
    font-size: 1.02rem;
    max-width: 600px;
}

/* -------------------- SURFACES -------------------- */
.card {
    position: relative;
    background: var(--color-surface-glass);
    border-radius: var(--radius-xl);
    padding: 2.4rem;
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.card::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.04);
    pointer-events: none;
}

.card + .card {
    margin-top: 2rem;
}

.card__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.8rem;
}

.card__eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.36em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.card__title {
    font-size: 1.55rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-accent);
}

.card--table {
    padding: 0;
    overflow: hidden;
}

.card--table .card__heading {
    padding: 2.2rem 2.4rem 1.4rem;
}

.card--table .card__body {
    padding: 0 2.4rem 2.4rem;
}

.card--stacked {
    display: grid;
    gap: 1.6rem;
}

/* -------------------- STATUS BANNERS -------------------- */
.status-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.6rem;
    padding: 1.2rem 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.04);
}

.status-banner__content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.status-banner strong {
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.82rem;
}

.status-banner span {
    color: var(--color-text-secondary);
}

.status-banner--success {
    border-color: rgba(46, 232, 164, 0.4);
    background: linear-gradient(120deg, var(--color-success-soft), rgba(10, 16, 16, 0.7));
}

.status-banner--warning {
    border-color: rgba(255, 179, 71, 0.45);
    background: linear-gradient(120deg, var(--color-warning-soft), rgba(24, 16, 8, 0.7));
}

.status-banner--danger {
    border-color: rgba(255, 79, 100, 0.45);
    background: linear-gradient(120deg, var(--color-danger-soft), rgba(24, 10, 12, 0.75));
}

.status-banner .button {
    flex-shrink: 0;
}

/* -------------------- BUTTONS -------------------- */
.button,
.btn,
button,
input[type="submit"],
input[type="button"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.75rem 1.65rem;
    border-radius: var(--radius-pill, 999px);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    border: 1px solid transparent;
    background: linear-gradient(135deg, rgba(255, 26, 64, 0.95), rgba(120, 14, 30, 0.92));
    color: var(--color-text-primary);
    box-shadow: var(--shadow-sm);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.button:hover,
.button:focus-visible,
.btn:hover,
.btn:focus-visible,
button:hover,
button:focus-visible,
input[type="submit"]:hover,
input[type="submit"]:focus-visible,
input[type="button"]:hover,
input[type="button"]:focus-visible {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.button--ghost {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.18);
    color: var(--color-text-secondary);
}

.button--ghost:hover,
.button--ghost:focus-visible {
    border-color: rgba(255, 255, 255, 0.32);
    box-shadow: var(--shadow-sm);
}

.button--subtle {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--color-text-secondary);
}

.button--subtle.active {
    background: rgba(255, 26, 64, 0.2);
    border-color: rgba(255, 26, 64, 0.4);
    color: var(--color-text-primary);
}

.toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

/* -------------------- ALERTS -------------------- */
.alert {
    padding: 1.2rem 1.6rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 16, 24, 0.82);
    box-shadow: var(--shadow-sm);
    color: var(--color-text-secondary);
}

.alert + .alert {
    margin-top: 1.2rem;
}

.alert--success { border-color: rgba(46, 232, 164, 0.4); background: linear-gradient(140deg, var(--color-success-soft), rgba(10, 18, 16, 0.85)); color: #9fffe0; }
.alert--warning { border-color: rgba(255, 179, 71, 0.45); background: linear-gradient(140deg, var(--color-warning-soft), rgba(24, 16, 8, 0.85)); color: #ffe1af; }
.alert--danger { border-color: rgba(255, 79, 100, 0.45); background: linear-gradient(140deg, var(--color-danger-soft), rgba(24, 10, 12, 0.85)); color: #ffd3d9; }

.alert summary {
    cursor: pointer;
    color: var(--color-text-primary);
}

.alert ul {
    margin: 0.75rem 0 0 1.2rem;
}

/* -------------------- TABLES -------------------- */
.table-wrapper {
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(12, 14, 22, 0.9);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.data-table,
.excel-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--color-text-secondary);
}

.data-table thead,
.excel-table thead {
    background: rgba(14, 14, 22, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table th,
.data-table td,
.excel-table th,
.excel-table td {
    padding: 0.9rem 1.15rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table tbody tr:nth-of-type(even),
.excel-table tbody tr:nth-of-type(even) {
    background: rgba(255, 255, 255, 0.03);
}

.data-table tbody tr:hover,
.excel-table tbody tr:hover {
    background: rgba(255, 26, 64, 0.12);
}

.excel-table {
    min-width: 100%;
    table-layout: auto;
}

.excel-table th,
.excel-table td {
    white-space: nowrap;
    min-width: 120px;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.excel-table thead th {
    color: var(--color-accent-strong);
    border-bottom: 1px solid rgba(255, 26, 64, 0.4);
    padding: 1.2rem 1rem;
    vertical-align: top;
}

.header-title {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
    color: var(--color-text-primary);
}

.header-mapper {
    width: 100%;
    min-width: 180px;
    padding: 0.5rem 0.7rem;
    font-size: 0.75rem;
    border-radius: var(--radius-xs);
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(18, 18, 26, 0.85);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.header-mapper:focus {
    outline: none;
    border-color: rgba(255, 26, 64, 0.5);
}

.header-mapper option {
    background: rgba(12, 14, 22, 0.95);
    color: var(--color-text-primary);
}

.excel-preview {
    margin-top: 1.6rem;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(10, 10, 16, 0.88);
    box-shadow: var(--shadow-md);
    overflow-x: auto;
    overflow-y: auto;
    width: 100%;
    max-width: 100%;
    max-height: 560px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 26, 64, 0.4) rgba(255, 255, 255, 0.08);
}

.excel-preview::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.excel-preview::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-xs);
}

.excel-preview::-webkit-scrollbar-thumb {
    background: rgba(255, 26, 64, 0.4);
    border-radius: var(--radius-xs);
}

.excel-preview::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 26, 64, 0.6);
}

/* -------------------- BADGES -------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-pill, 999px);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: var(--color-text-primary);
}

.badge--success { border-color: rgba(46, 232, 164, 0.45); background: rgba(46, 232, 164, 0.2); }
.badge--failed { border-color: rgba(255, 79, 100, 0.45); background: rgba(255, 79, 100, 0.2); }

/* -------------------- FORM ELEMENTS -------------------- */
form {
    display: grid;
    gap: 1.6rem;
}

.field {
    display: grid;
    gap: 0.45rem;
}

.field__hint {
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
}

.field-group {
    display: grid;
    gap: 1.4rem;
}

label {
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.82rem;
    color: var(--color-text-secondary);
}

input,
select,
textarea {
    width: 100%;
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(12, 14, 22, 0.9);
    color: var(--color-text-primary);
    transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.32);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(255, 26, 64, 0.45);
    box-shadow: 0 16px 28px -24px rgba(255, 26, 64, 0.65);
}

textarea {
    min-height: 160px;
    resize: vertical;
}

fieldset {
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.6rem 1.8rem;
    background: rgba(14, 15, 24, 0.72);
}

legend {
    padding: 0 0.5rem;
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-accent);
}

/* -------------------- TYPOGRAPHY & UTILITIES -------------------- */
.text-muted { color: var(--color-text-muted); }
.text-accent { color: var(--color-accent); }

.surface-note {
    padding: 1rem 1.2rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(18, 18, 26, 0.75);
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.surface-note--success { border-color: rgba(46, 232, 164, 0.45); background: linear-gradient(135deg, var(--color-success-soft), rgba(10, 18, 16, 0.8)); color: #aefee4; }
.surface-note--info { border-color: rgba(140, 170, 255, 0.35); background: linear-gradient(135deg, rgba(96, 128, 255, 0.16), rgba(12, 18, 32, 0.8)); color: #d9e1ff; }
.surface-note--warning { border-color: rgba(255, 179, 71, 0.45); background: linear-gradient(135deg, rgba(255, 179, 71, 0.2), rgba(32, 18, 12, 0.85)); color: #ffe3ba; }
.surface-note--danger { border-color: rgba(255, 79, 100, 0.45); background: linear-gradient(135deg, rgba(255, 79, 100, 0.2), rgba(32, 12, 14, 0.85)); color: #ffcfd5; }

.list-glass {
    margin: 0;
    padding-left: 1.4rem;
    display: grid;
    gap: 0.5rem;
    color: var(--color-text-muted);
    list-style: disc;
}

.list-glass li {
    line-height: 1.6;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.stack {
    display: grid;
    gap: 1.6rem;
}

.stack > * {
    min-width: 0;
}

.site-footer {
    margin-top: 6rem;
    padding: 1.2rem 2.4rem;
    border-top: 1px solid rgba(255, 26, 64, 0.28);
    background: rgba(7, 7, 12, 0.85);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    position: relative;
}

.site-footer::before {
    content: "";
    position: absolute;
    left: 24px;
    right: 24px;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 26, 64, 0.5), transparent);
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-copyright {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    letter-spacing: 0.06em;
}

.footer-version {
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-pill);
    background: rgba(255, 26, 64, 0.12);
    border: 1px solid rgba(255, 26, 64, 0.3);
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-link {
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    transition: color 0.2s ease;
    text-decoration: none;
}

.footer-link:hover {
    color: var(--color-text-primary);
}

.footer-divider {
    color: var(--color-text-muted);
    opacity: 0.5;
}

/* -------------------- RESPONSIVE -------------------- */
@media (max-width: 1140px) {
    .header-content {
        padding-inline: 2rem;
    }

    .container {
        padding-inline: 2rem;
    }
}

@media (max-width: 1200px) {
    .user-menu {
        gap: 1.2rem;
    }

    .user-email {
        font-size: 0.85rem;
    }

    .logout-btn {
        padding: 0.6rem 1.1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 900px) {
    .header-content {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .user-menu {
        order: 1;
        margin-left: auto;
        gap: 1rem;
    }

    .user-email {
        display: none;
    }
}

@media (max-width: 640px) {
    .header-content {
        padding-inline: 1.4rem;
        padding-block: 1rem;
    }

    .container {
        padding-inline: 1.4rem;
        margin: 2rem auto 3rem;
    }

    .logo-image {
        height: 36px;
    }

    .logout-btn {
        padding: 0.55rem 1rem;
        font-size: 0.82rem;
    }

    .card {
        padding: 1.6rem 1.4rem;
    }

    .card__heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .status-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .button-row {
        width: 100%;
    }

    .button-row .button,
    .button-row .btn {
        width: 100%;
        justify-content: center;
    }

    .excel-preview {
        max-height: 400px;
    }

    .page-title {
        font-size: 1.75rem;
    }

    /* Mobile viewport fixes - prevent off-screen content */
    .search-card,
    .store-info-card,
    .issues-section,
    .email-preview {
        max-width: 100%;
        overflow-x: auto;
    }

    .info-grid {
        flex-direction: column;
        gap: 1rem;
    }

    .template-grid {
        grid-template-columns: 1fr;
    }

    .send-comms-grid {
        grid-template-columns: 1fr;
    }

    .email-card {
        max-width: 100%;
        overflow-wrap: break-word;
    }

    /* Ensure inputs and buttons fit on mobile */
    .search-input,
    .form-textarea,
    input[type="text"],
    input[type="tel"],
    input[type="email"],
    select,
    button {
        max-width: 100%;
    }

    /* Fix back button on mobile */
    .back-button {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }

    /* Ensure modal fits on mobile */
    .modal__content {
        max-width: 95vw;
        max-height: 90vh;
    }

    .modal__body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* -------------------- POST DEPLOYMENT PAGE -------------------- */
.pd-section {
    background: linear-gradient(140deg, rgba(15, 15, 22, 0.92), rgba(24, 12, 16, 0.85));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.pd-section__title {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pd-search-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.pd-search-input {
    width: 140px;
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(12, 14, 22, 0.9);
    color: var(--color-text-primary);
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.15em;
}

.pd-search-input:focus {
    outline: none;
    border-color: rgba(255, 26, 64, 0.45);
    box-shadow: 0 0 0 3px rgba(255, 26, 64, 0.1);
}

.pd-search-input::placeholder {
    color: var(--color-text-muted);
    font-weight: 400;
}

.pd-result-box {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    background: rgba(46, 232, 164, 0.08);
    border-left: 3px solid var(--color-success);
}

.pd-result-box--error {
    background: rgba(255, 26, 64, 0.08);
    border-left-color: var(--color-accent);
}

.pd-result-box__title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pd-result-box__title--success {
    color: var(--color-success);
}

.pd-result-box__title--error {
    color: var(--color-accent);
}

.pd-result-box__detail {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.25rem;
}

.pd-result-box__detail strong {
    color: var(--color-text-primary);
}

/* Equipment Grid */
.pd-equipment-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media (max-width: 768px) {
    .pd-equipment-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .pd-equipment-grid {
        grid-template-columns: 1fr;
    }
}

.pd-equipment-card {
    background: rgba(12, 14, 22, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 1.25rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.pd-equipment-card:hover {
    border-color: rgba(255, 26, 64, 0.3);
    background: rgba(24, 12, 16, 0.6);
}

.pd-equipment-card.selected {
    border-color: var(--color-success);
    background: rgba(46, 232, 164, 0.1);
}

.pd-equipment-card__name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-text-primary);
    letter-spacing: 0.02em;
}

.pd-equipment-card.selected .pd-equipment-card__name {
    color: var(--color-success);
}

.pd-equipment-card__check {
    display: none;
}

.pd-equipment-card.selected .pd-equipment-card__check {
    display: inline;
    margin-left: 0.5rem;
    color: var(--color-success);
}

/* Issues Row */
.pd-issues-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .pd-issues-row {
        grid-template-columns: 1fr;
    }
}

.pd-form-group {
    display: flex;
    flex-direction: column;
}

.pd-label {
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    margin-bottom: 0.6rem;
}

.pd-textarea {
    width: 100%;
    min-height: 120px;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(12, 14, 22, 0.9);
    color: var(--color-text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pd-textarea:focus {
    outline: none;
    border-color: rgba(255, 26, 64, 0.45);
    box-shadow: 0 0 0 3px rgba(255, 26, 64, 0.1);
}

.pd-textarea::placeholder {
    color: var(--color-text-muted);
}

.pd-help-text {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}

/* Checkbox Row */
.pd-checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 179, 71, 0.08);
    border: 1px solid rgba(255, 179, 71, 0.2);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.pd-checkbox-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--color-warning);
    cursor: pointer;
}

.pd-checkbox-row__label {
    font-weight: 600;
    color: var(--color-text-primary);
    font-size: 0.95rem;
}

.pd-checkbox-row__hint {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-left: auto;
}

/* File Upload */
.pd-file-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-primary);
    transition: all 0.2s ease;
}

.pd-file-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

.pd-file-list {
    margin-top: 1rem;
}

.pd-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.8rem;
    background: rgba(46, 232, 164, 0.08);
    border: 1px solid rgba(46, 232, 164, 0.2);
    border-radius: var(--radius-xs);
    margin-bottom: 0.5rem;
}

.pd-file-item__name {
    font-weight: 500;
    color: var(--color-text-primary);
    font-size: 0.9rem;
}

.pd-file-item__size {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

.pd-file-item__remove {
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-xs);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: rgba(255, 26, 64, 0.8);
    color: #fff;
    transition: background 0.2s ease;
}

.pd-file-item__remove:hover {
    background: rgba(255, 26, 64, 1);
}

/* Send Button */
.pd-send-section {
    text-align: center;
    padding: 1rem 0;
}

.pd-send-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1.1rem 3rem;
    border-radius: var(--radius-pill, 999px);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    background: linear-gradient(135deg, rgba(46, 232, 164, 0.95), rgba(20, 140, 100, 0.92));
    color: #000;
    box-shadow: var(--shadow-md);
    transition: all 0.22s ease;
}

.pd-send-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px -10px rgba(46, 232, 164, 0.4);
}

.pd-send-btn:disabled {
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-text-muted);
    cursor: not-allowed;
    box-shadow: none;
}

.pd-send-btn--sending {
    background: rgba(255, 179, 71, 0.9);
}

.pd-send-btn--sent {
    background: var(--color-success);
}

/* Post Deployment - Disabled/Coming Soon Cards */
.pd-equipment-card.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    position: relative;
}

.pd-equipment-card.disabled::after {
    content: 'Coming Soon';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    color: var(--color-text-primary);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-xs);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.pd-equipment-card.disabled:hover::after {
    opacity: 1;
}

.pd-equipment-card.disabled:hover {
    pointer-events: auto;
    opacity: 0.5;
}

/* Updated Tag for Cards */
.card-updated-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #2ee8a4, #14a06c);
    color: #000;
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-xs);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 8px rgba(46, 232, 164, 0.3);
    z-index: 10;
}
