* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

.page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    position: relative;
    overflow-x: hidden;
    background: #020617;
    color: #f1f5f9;
}

.glow {
    position: absolute;
    border-radius: 9999px;
    filter: blur(128px);
    opacity: 0.2;
    pointer-events: none;
}

.glow--purple {
    top: -1rem;
    left: -1rem;
    width: 28rem;
    height: 28rem;
    background: #a855f7;
}

.glow--blue {
    bottom: 0;
    right: -1rem;
    width: 28rem;
    height: 28rem;
    background: #3b82f6;
}

.wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 32rem;
}

.wrapper--wide {
    max-width: min(96vw, 1500px);
    width: 100%;
    align-self: flex-start;
    margin: 1.5rem auto 2.5rem;
}

.card {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid #1e293b;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.card--center {
    max-width: 28rem;
    margin: 0 auto;
    text-align: center;
}

.heading {
    margin: 0 0 0.5rem;
    font-size: 1.875rem;
    font-weight: 800;
    line-height: 1.2;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
}

.heading--purple {
    background-image: linear-gradient(to right, #c084fc, #22d3ee);
}

.heading--green {
    background-image: linear-gradient(to right, #34d399, #2dd4bf);
}

.subtext {
    color: #94a3b8;
    font-size: 0.875rem;
    margin: 0 0 1.5rem;
    line-height: 1.625;
}

.alert {
    padding: 0.875rem 1.25rem;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    background: rgba(127, 29, 29, 0.5);
    border: 1px solid #991b1b;
    color: #f87171;
}

.alert--success {
    background: rgba(6, 78, 59, 0.5);
    border: 1px solid #047857;
    color: #34d399;
}

.alert--info {
    background: rgba(12, 74, 110, 0.5);
    border: 1px solid #0284c7;
    color: #38bdf8;
}

/* Honeypot Spam Trap */
.honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

.form {
    display: grid;
    gap: 1.25rem;
}

.field {
    display: grid;
    gap: 0.5rem;
}

.field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

.input,
.textarea,
.select {
    width: 100%;
    background: #020617;
    border: 1px solid #1e293b;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: #f1f5f9;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input::placeholder,
.textarea::placeholder {
    color: #475569;
}

.input:focus,
.textarea:focus,
.select:focus {
    outline: none;
    border-color: #a855f7;
    box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.2);
}

.textarea {
    resize: none;
}

.button {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 0.75rem;
    background: linear-gradient(to right, #9333ea, #0891b2);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(168, 85, 247, 0.1);
    transition: box-shadow 0.3s, transform 0.3s, background 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.button:hover {
    background: linear-gradient(to right, #a855f7, #06b6d4);
    box-shadow: 0 10px 15px -3px rgba(168, 85, 247, 0.25);
}

.button:active {
    transform: scale(0.98);
}

.check-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 9999px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
    margin-bottom: 1.5rem;
}

.check-icon svg {
    width: 2rem;
    height: 2rem;
}

.link-button {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #1e293b;
    color: #f1f5f9;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    border: 1px solid #334155;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.link-button:hover {
    background: #334155;
    border-color: #64748b;
}

/* Admin Dashboard Styles */
.admin-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #1e293b;
}

.admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.filter-pill {
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    background: #1e293b;
    color: #94a3b8;
    border: 1px solid #334155;
    transition: all 0.2s;
}

.filter-pill:hover {
    color: #f1f5f9;
    border-color: #64748b;
}

.filter-pill.active {
    background: linear-gradient(to right, #9333ea, #0891b2);
    color: #ffffff;
    border-color: transparent;
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    background: #020617;
    border: 1px solid #1e293b;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: #f1f5f9;
    font-size: 0.875rem;
}

.btn-small {
    padding: 0.45rem 0.85rem;
    font-size: 0.8125rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: background 0.2s;
}

.btn-primary {
    background: linear-gradient(to right, #9333ea, #0891b2);
    color: #ffffff;
}

.btn-primary:hover {
    background: linear-gradient(to right, #a855f7, #06b6d4);
}

.btn-danger {
    background: #991b1b;
    color: #fef2f2;
    border: 1px solid #b91c1c;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-secondary {
    background: #1e293b;
    color: #cbd5e1;
    border: 1px solid #334155;
}

.btn-secondary:hover {
    background: #334155;
    color: #f8fafc;
}

/* Bulk Action Bar */
.bulk-bar {
    background: #0f172a;
    border: 1px solid #3b82f6;
    border-radius: 0.75rem;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.bulk-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Table and Obvious Scrollbar */
.table-responsive {
    overflow-x: auto;
    border-radius: 0.75rem;
    border: 1px solid #1e293b;
    background: #020617;
    scrollbar-width: thin;
    scrollbar-color: #6366f1 #0f172a;
}

.table-responsive::-webkit-scrollbar {
    height: 10px;
    width: 10px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #0f172a;
    border-radius: 0 0 0.75rem 0.75rem;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 5px;
    border: 2px solid #0f172a;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #a855f7;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    text-align: left;
}

.data-table th {
    background: #0f172a;
    padding: 0.875rem 1rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
    border-bottom: 1px solid #1e293b;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #1e293b;
    color: #e2e8f0;
    vertical-align: top;
}

.data-table tr:hover td {
    background: rgba(30, 41, 59, 0.4);
}

.checkbox-custom {
    width: 1.15rem;
    height: 1.15rem;
    cursor: pointer;
    accent-color: #a855f7;
    margin-top: 0.2rem;
}

/* Consolidated Contact & Tag column styles */
.contact-cell {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.contact-name {
    font-weight: 700;
    color: #f8fafc;
    font-size: 0.9375rem;
}

.contact-email {
    color: #38bdf8;
    text-decoration: none;
    font-size: 0.8125rem;
    word-break: break-all;
}

.contact-email:hover {
    text-decoration: underline;
}

.contact-tag-container {
    margin-top: 0.15rem;
}

.meta-cell {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.message-cell {
    white-space: pre-wrap;
    word-break: break-word;
    color: #cbd5e1;
    line-height: 1.6;
    font-size: 0.875rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.badge--id {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.2);
}

.badge--reviewed {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.3);
}

.badge--spam {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

.badge--followup {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.3);
}

.badge--archived {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.3);
}

.row-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #64748b;
}
