:root {
    --brand-deep-blue: #3f51b5;
    --brand-vibrant-teal: #87ceeb;
    --brand-soft-teal: rgba(135, 206, 235, 0.5);
    --brand-darker-teal: #6aadda;
    --brand-soft-red: #e57373;
    --brand-secondary-blue: #4A90E2;
    --brand-light-bg: #f8f8ff;
    --brand-dark-blue: #1a1a2e;
    --brand-bubble-tint: #f0f8ff;
    --brand-soft-shadow: 0 4px 10px rgba(135, 206, 235, 0.4);
}

/* Global reset to match Bootstrap behavior in Client */
*, ::after, ::before {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--brand-dark-blue);
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
}

h1 {
    font-size: 2.5em;
    color: var(--brand-deep-blue);
    margin-bottom: 24px;
    font-weight: 700;
    outline: none;
}

h2 {
    font-size: 2em;
    color: var(--brand-secondary-blue);
    margin-top: 32px;
    margin-bottom: 16px;
}

.main-header {
    background-color: #fff;
    padding: 10px 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-bottom: 1px solid var(--brand-bubble-tint);
}

.header-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    gap: 1rem;
}

.header-left {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.header-left strong {
    font-size: 1.2rem;
    letter-spacing: 0.5px;
    color: var(--brand-deep-blue);
}

.header-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.nav-icons {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    justify-content: center;
}

.nav-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.2s ease-in-out;
    background-color: transparent;
    color: var(--brand-deep-blue);
    text-decoration: none;
}

.nav-icon:hover {
    background-color: #f5fbff;
    color: var(--brand-vibrant-teal);
    transform: translateY(-1px);
}

.nav-icon.active {
    color: var(--brand-vibrant-teal);
}

.nav-icon svg {
    width: 64px;
    height: 64px;
    display: block;
    fill: currentColor;
}

.main-content {
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Admin List Styles */
.admin-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 16px 0;
}

.admin-item {
    background: var(--brand-bubble-tint);
    border: 1px solid var(--brand-soft-teal);
    border-radius: 15px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 1px 3px rgba(135, 206, 235, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.admin-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(135, 206, 235, 0.2);
}

.admin-email {
    font-weight: 600;
    color: var(--brand-deep-blue);
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    border-radius: 18px; /* Synced with Client .btn */
    padding: 8px 20px;   /* Synced with Client .btn */
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
}

/* --- Primary Button --- */
.btn-primary {
    background-color: #87ceeb; /* Synced with Client .btn-primary */
    color: white;
    border: none;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(135, 206, 235, 0.4);
}

.btn-primary:hover {
    background-color: #6aadda; /* Synced with Client .btn-primary:hover */
    box-shadow: 0 4px 10px rgba(135, 206, 235, 0.4);
    transform: translateY(-2px);
}

/* --- Secondary Button --- */
.btn-secondary {
    background-color: transparent;
    border: 2px solid rgba(135, 206, 235, 0.5); /* Synced with Client .btn-secondary */
    color: #87ceeb;
    font-size: 1.1rem;
}

.btn-secondary:hover {
    background-color: rgba(135, 206, 235, 0.1);
    border-color: #87ceeb;
    color: #6aadda;
}

.btn-danger {
    background-color: transparent;
    color: var(--brand-soft-red);
    border: 1px solid var(--brand-soft-red);
}

.btn-danger:hover {
    background-color: var(--brand-soft-red);
    color: white;
}

.btn-warning {
    background-color: #ffb74d;
    color: white;
}

.btn-sm {
    padding: 3px 10px;
    font-size: 0.75rem;
}

/* Form Controls */
.form-control {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid rgba(135, 206, 235, 0.5); /* Synced with Client .form-control */
    border-radius: 15px;
    font-size: 1rem;
    color: #1a1a2e;
    background-color: #ffffff;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: inherit; /* Should inherit body font */
    line-height: 1.5; /* Match Bootstrap base */
}

.form-control:focus {
    border-color: #87ceeb;
    box-shadow: 0 0 0 3px rgba(135, 206, 235, 0.4);
}

/* Table Styles */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.table th {
    text-align: left;
    padding: 10px 12px;
    color: var(--brand-deep-blue);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--brand-bubble-tint);
}

.table tr {
    background: #fff;
    transition: background-color 0.2s;
}

.table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--brand-light-bg);
    font-size: 0.9rem;
}

.table tr:hover td {
    background-color: var(--brand-bubble-tint);
}

/* Topic Tags */
.bubble-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #3f51b5;
    background-color: #f0f8ff;
    padding: 4px 10px;
    border-radius: 8px;
}

/* Fracture Icons */
.fracture-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fracture-icon:hover {
    transform: scale(1.2);
}

.fracture-icon.consensus { color: #00897B; }
.fracture-icon.debating  { color: #FB8C00; }
.fracture-icon.polarized { color: #E53935; }

/* Badges */
.status-badge {
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-active { background: #e8f5e9; color: #2e7d32; }
.status-closed { background: #ffebee; color: #c62828; }
.status-popped { background: #fff3e0; color: #ef6c00; }

/* Filter Bar */
.filter-bar {
    background: var(--brand-bubble-tint);
    padding: 12px 20px;
    border-radius: 15px;
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    align-items: center;
    margin-bottom: 20px;
    border: 1px solid var(--brand-soft-teal);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.filter-group label {
    font-weight: 600;
    color: var(--brand-deep-blue);
    font-size: 0.9rem;
}

.status-filter {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
}

/* Login Container */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 100px;
}

.error-message {
    color: var(--brand-soft-red);
    font-weight: 600;
    padding: 12px;
    background: #fff5f5;
    border-radius: 12px;
    margin: 16px 0;
}

/* --- Modal Styles --- */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-form {
    background-color: var(--brand-light-bg);
    border-radius: 20px;
    padding: 40px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), 0 0 0 10px rgba(135, 206, 235, 0.2);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-header {
    text-align: center;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--brand-soft-teal);
    padding-bottom: 15px;
}

.modal-header h2 {
    color: var(--brand-deep-blue);
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
}

.form-section {
    margin-bottom: 10px;
}

.form-group.compact {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--brand-deep-blue);
    font-size: 0.9rem;
}

.server-error-banner {
    background-color: #fef2f2;
    border: 1px solid var(--brand-soft-red);
    color: var(--brand-soft-red);
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}
