body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #08131a;
    color: #eef7fb;
}

.topbar {
    height: 92px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 70px;
    background: rgba(8, 19, 26, 0.9);
    border-bottom: 1px solid rgba(112, 166, 188, 0.22);
}

.logo-wrap {
    display: flex;
    align-items: center;
}

.logo {
    height: 58px;
    width: auto;
    background: white;
    padding: 8px 12px;
    border-radius: 8px;
}

nav {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

nav a {
    color: #a9c7d4;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
}

nav a:hover {
    color: white;
}

.hero {
    min-height: calc(100vh - 92px);
    display: grid;
    grid-template-columns: 1fr 520px;
    gap: 64px;
    align-items: center;
    padding: 72px 70px;
    background:
        radial-gradient(circle at 76% 24%, rgba(86, 137, 158, 0.28), transparent 32%),
        radial-gradient(circle at 12% 86%, rgba(56, 189, 248, 0.14), transparent 30%),
        linear-gradient(135deg, #08131a 0%, #102734 48%, #08131a 100%);
}

.hero-left {
    max-width: 780px;
}

.eyebrow {
    color: #7bb4cc;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 18px;
}

h1 {
    font-size: 64px;
    line-height: 1.02;
    margin: 0 0 26px;
    color: #ffffff;
}

.hero-text {
    font-size: 20px;
    line-height: 1.65;
    max-width: 680px;
    color: #b4ccd7;
    margin-bottom: 36px;
}

.hero-actions,
.preview-actions,
.contact-button-row,
.action-row {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

.button {
    display: inline-block;
    text-decoration: none;
    padding: 15px 24px;
    border-radius: 7px;
    font-weight: bold;
    cursor: pointer;
}

.compact-button {
    padding: 11px 16px;
}

.button.primary {
    background: #66a7c0;
    color: #061016;
    border: none;
    box-shadow: 0 18px 34px rgba(102, 167, 192, 0.25);
}

.button.primary:hover {
    background: #8bc3d8;
}

.button.secondary {
    color: #dff4fb;
    border: 1px solid rgba(169, 199, 212, 0.34);
    background: transparent;
}

.button.secondary:hover {
    background: rgba(255, 255, 255, 0.06);
}

.button.danger {
    background: rgba(255, 117, 117, 0.16);
    color: #ffb3b3;
    border: 1px solid rgba(255, 117, 117, 0.35);
}

.button.danger:hover {
    background: rgba(255, 117, 117, 0.24);
}

.dashboard-preview,
.form-card,
.email-preview-card,
.contacts-card,
.template-card,
.inbox-list-panel,
.inbox-detail-panel {
    background: rgba(11, 28, 38, 0.72);
    border: 1px solid rgba(151, 199, 218, 0.22);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.preview-header p {
    margin: 0 0 6px;
    color: #7bb4cc;
    font-size: 13px;
    font-weight: bold;
}

.preview-header h2,
.form-card h2,
.template-card h2 {
    margin: 0;
    font-size: 24px;
    color: white;
}

.status,
.template-tag {
    background: rgba(71, 211, 142, 0.14);
    color: #70e0a5;
    border: 1px solid rgba(112, 224, 165, 0.26);
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: bold;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(151, 199, 218, 0.14);
    border-radius: 12px;
    padding: 16px;
}

.stat-card span {
    color: #a9c7d4;
    font-size: 13px;
}

.stat-card strong {
    display: block;
    margin-top: 8px;
    font-size: 32px;
    color: white;
}

.ticket-list,
.contact-list,
.saved-technician-list,
.job-list {
    display: grid;
    gap: 12px;
}

.ticket,
.saved-technician,
.contact-card,
.job-card {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(151, 199, 218, 0.14);
    border-radius: 12px;
    padding: 16px;
}

.ticket {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
}

.ticket strong,
.contact-view strong,
.saved-technician strong,
.job-card strong {
    display: block;
    color: white;
    margin-bottom: 5px;
}

.ticket span,
.contact-view span,
.saved-technician span,
.job-card span {
    color: #a9c7d4;
    font-size: 14px;
}

.ticket p {
    margin: 0;
    color: #8bc3d8;
    font-weight: bold;
}

.home-card-link {
    color: inherit;
    text-decoration: none;
}

.home-card-link:hover .ticket,
.saved-technician:hover,
.job-card:hover,
.job-card.selected {
    border-color: rgba(139, 195, 216, 0.44);
    background: rgba(255, 255, 255, 0.1);
}

.page-shell {
    min-height: calc(100vh - 92px);
    padding: 64px 70px;
    background:
        radial-gradient(circle at 78% 18%, rgba(86, 137, 158, 0.22), transparent 28%),
        linear-gradient(135deg, #08131a 0%, #102734 48%, #08131a 100%);
}

.page-header {
    max-width: 820px;
    margin-bottom: 36px;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(280px, 1fr));
    gap: 18px;
}

.template-card h2 {
    margin: 14px 0 10px;
    font-size: 22px;
}

.template-card p {
    color: #a9c7d4;
    line-height: 1.6;
    min-height: 78px;
}

.builder-layout,
.contacts-layout,
.inbox-layout {
    display: grid;
    grid-template-columns: minmax(320px, 520px) 1fr;
    gap: 24px;
    align-items: start;
}

.template-form,
.contact-form,
.login-form {
    display: grid;
    gap: 16px;
}

label,
.login-form label,
.template-form label,
.contact-form label,
.edit-contact-form label,
.preview-label {
    display: block;
    color: #a9c7d4;
    font-weight: bold;
    font-size: 14px;
    margin: 14px 0 7px;
}

input,
select,
textarea,
.search-input,
.subject-output {
    width: 100%;
    box-sizing: border-box;
    background-color: #132b38;
    border: 1px solid rgba(151, 199, 218, 0.32);
    border-radius: 8px;
    color: #ffffff;
    padding: 14px;
    font-size: 15px;
}

option {
    background-color: #132b38;
    color: #ffffff;
}

input:focus,
select:focus,
textarea:focus,
.search-input:focus,
.subject-output:focus {
    outline: none;
    border-color: #8bc3d8;
    box-shadow: 0 0 0 3px rgba(139, 195, 216, 0.16);
}

textarea,
.email-preview-card textarea {
    min-height: 720px;
    line-height: 1.6;
    resize: vertical;
}

.error-message {
    background: rgba(255, 117, 117, 0.1);
    border: 1px solid rgba(255, 117, 117, 0.35);
    color: #ffb3b3;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-weight: bold;
}

.success-message,
.status-message {
    background: rgba(71, 211, 142, 0.14);
    border: 1px solid rgba(112, 224, 165, 0.26);
    color: #70e0a5;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-weight: bold;
}

.small-message {
    color: #70e0a5;
    font-weight: bold;
    min-height: 20px;
    margin: 12px 0 0;
}

.public-policy-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(151, 199, 218, 0.14);
}

.public-policy-links a {
    color: #9ee8ff;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
}

.public-policy-links a:hover {
    color: #ffffff;
}

.empty-text {
    color: #a9c7d4;
    line-height: 1.6;
    margin: 0 0 16px;
}

.saved-technician-list {
    max-height: 220px;
    overflow-y: auto;
    margin: 12px 0 18px;
}

.saved-technician-list.hidden,
.hidden {
    display: none;
}

.saved-technician {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    text-align: left;
    color: white;
    cursor: pointer;
}

.contact-view {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
}

.edit-contact-form {
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: end;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(151, 199, 218, 0.14);
}

.edit-contact-form:not(.hidden) {
    display: grid;
}

.filter-tools,
.inbox-toolbar {
    display: grid;
    grid-template-columns: 1fr minmax(220px, 280px);
    gap: 14px;
    align-items: center;
}

.inbox-control-panel {
    margin-bottom: 24px;
}

.inbox-list-panel,
.inbox-detail-panel {
    min-height: 360px;
}

.job-list {
    max-height: 720px;
    overflow-y: auto;
    padding-right: 4px;
}

.job-card {
    display: grid;
    gap: 8px;
    width: 100%;
    text-align: left;
    color: white;
    cursor: pointer;
}

.job-card-top {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.job-card-top span {
    flex: 0 0 auto;
    background: rgba(71, 211, 142, 0.14);
    color: #70e0a5;
    border: 1px solid rgba(112, 224, 165, 0.26);
    border-radius: 999px;
    padding: 6px 9px;
    font-size: 12px;
    font-weight: bold;
}

.job-card-meta {
    display: grid;
    gap: 4px;
}

.job-card-meta small {
    color: #a9c7d4;
    font-size: 13px;
}

.job-detail-grid,
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.job-detail-grid div,
.detail-grid div {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(151, 199, 218, 0.14);
    border-radius: 12px;
    padding: 14px;
}

.job-detail-grid span,
.detail-grid span {
    display: block;
    color: #a9c7d4;
    font-size: 13px;
    margin-bottom: 6px;
}

.job-detail-grid strong,
.detail-grid strong {
    color: white;
    word-break: break-word;
}

.disabled-link {
    opacity: 0.45;
    pointer-events: none;
}

@media (max-width: 1100px) {
    .hero,
    .builder-layout,
    .contacts-layout,
    .inbox-layout,
    .filter-tools,
    .inbox-toolbar {
        grid-template-columns: 1fr;
    }

    .job-list {
        max-height: none;
    }

    .template-grid {
        grid-template-columns: repeat(2, minmax(280px, 1fr));
    }
}

@media (max-width: 950px) {
    .topbar {
        padding: 0 24px;
    }

    .hero,
    .page-shell {
        padding: 48px 24px;
    }

    h1 {
        font-size: 44px;
    }

    nav {
        gap: 16px;
    }
}

@media (max-width: 650px) {
    .template-grid,
    .job-detail-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        height: auto;
        padding: 18px 24px;
        gap: 18px;
        flex-direction: column;
        align-items: flex-start;
    }

    .ticket,
    .contact-view,
    .job-card-top {
        align-items: flex-start;
        flex-direction: column;
    }
}
