/* ===========================
   G V L R  G E M S  -  B A S I S
   =========================== */

:root {
    --gems-primary: #009688;
    --gems-primary-dark: #00796b;
    --gems-bg: #f5f7fa;
    --gems-card-bg: #ffffff;
    --gems-text: #22313f;
    --gems-muted: #7f8c8d;
    --gems-error: #c0392b;
    --gems-border-subtle: #e0e4ea;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #e0f7fa, #eceff1);
    color: var(--gems-text);
}

/* Login-pagina: body gecentreerd */
body.page-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

/* Portaal-pagina: full-width app-shell */
body.page-portal {
    min-height: 100vh;
}

/* Links, tekst, etc. */

a {
    color: inherit;
}

a.small-link {
    font-size: 0.8rem;
    color: var(--gems-muted);
    text-decoration: none;
}

a.small-link:hover {
    text-decoration: underline;
}

label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

/* ===========================
   C A R D S  &  M E S S A G E S
   =========================== */

.card {
    background: var(--gems-card-bg);
    border-radius: 18px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
    padding: 24px 24px 20px;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle at top left,
    rgba(0, 150, 136, 0.18),
    transparent 55%);
    z-index: -1;
}

.card-header {
    margin-bottom: 16px;
}

.card-header h2 {
    margin: 0 0 4px;
    font-size: 1.3rem;
}

.card-header p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--gems-muted);
}

/* Meldingen */

.message,
.message-box {
    margin-bottom: 12px;
    font-size: 0.9rem;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid transparent;
}

.message.info {
    background: #ecf3fd;
    border-color: rgba(52, 152, 219, 0.5);
    color: #21618c;
}

.message.error,
.message-box-error {
    background: #fdecea;
    border-color: rgba(192, 57, 43, 0.4);
    color: var(--gems-error);
}

.message.success,
.message-box {
    background: #ecf9f7;
    border-color: rgba(0, 150, 136, 0.35);
}

/* Kleine labels */

.step-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gems-muted);
    margin-bottom: 6px;
}

.step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gems-primary);
}

/* ===========================
   I N P U T S  &  B U T T O N S
   =========================== */

.field-group {
    margin-bottom: 14px;
}

input[type="email"],
input[type="text"],
select,
textarea {
    width: 100%;
    padding: 10px 11px;
    border-radius: 10px;
    border: 1px solid #d0d7de;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    background-color: #ffffff;
}

input[type="email"]:focus,
input[type="text"]:focus,
select:focus,
textarea:focus {
    border-color: var(--gems-primary);
    box-shadow: 0 0 0 3px rgba(0, 150, 136, 0.15);
}

textarea {
    min-height: 96px;
    resize: vertical;
}

button {
    border: none;
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--gems-primary), var(--gems-primary-dark));
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(0, 150, 136, 0.3);
    transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(0, 150, 136, 0.35);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 6px 12px rgba(0, 150, 136, 0.25);
}

.button-secondary,
.btn-ghost {
    background: #ffffff;
    color: var(--gems-primary-dark);
    border: 1px solid rgba(0, 150, 136, 0.25);
    box-shadow: none;
    font-size: 0.8rem;
    padding: 7px 12px;
}

.btn-primary {
    border-radius: 999px;
    padding: 9px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--gems-primary), var(--gems-primary-dark));
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(0, 150, 136, 0.3);
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(0, 150, 136, 0.35);
}

/* ===========================
   L O G I N  P A G E
   =========================== */

.login-wrapper {
    max-width: 420px;
    width: 100%;
}

.logo {
    text-align: center;
    margin-bottom: 16px;
}

.logo h1 {
    margin: 0;
    font-size: 1.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gems-primary-dark);
}

.logo small {
    display: block;
    font-size: 0.8rem;
    color: var(--gems-muted);
    margin-top: 4px;
}

.hint {
    font-size: 0.8rem;
    color: var(--gems-muted);
    margin-top: 2px;
}

.actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
    flex-wrap: wrap;
}

.step {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed rgba(0, 0, 0, 0.06);
    animation: fadeInUp 0.2s ease-out;
}

.step-hidden {
    display: none;
}

.step-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.footer-text {
    margin-top: 10px;
    font-size: 0.78rem;
    color: var(--gems-muted);
    text-align: center;
}

/* centraal scherm als je niet ingelogd bent (verify_code.php) */

.center-page {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.center-card {
    max-width: 420px;
    width: 100%;
}

/* ===========================
   P O R T A A L  (verify_code.php)
   =========================== */

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    max-width: 100%;
    background: #ffffffcc;
    backdrop-filter: blur(8px);
    border-right: 1px solid rgba(0,0,0,0.05);
    padding: 16px 14px 16px 18px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.sidebar-header {
    margin-bottom: 18px;
}

.logo-sub {
    font-size: 0.78rem;
    color: var(--gems-muted);
    margin-top: 2px;
}

.sidebar-section-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gems-muted);
    margin: 12px 0 6px;
}

.member-list {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.member-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 8px;
    border-radius: 10px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.12s ease, transform 0.08s ease;
}

.member-item:hover {
    background: rgba(0, 150, 136, 0.06);
    transform: translateY(-1px);
}

.menu-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e74c3c;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
}

.menu-badge--trial {
    background: #dcfce7;
    color: #166534;
}

.menu-badge--event {
    background: #dbeafe;
    color: #1d4ed8;
}

.menu-alert {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 0.75rem;
    font-weight: 800;
}

.member-avatar {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--gems-primary), var(--gems-primary-dark));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.75rem;
    margin-right: 8px;
    flex-shrink: 0;
}

.member-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-meta {
    font-size: 0.7rem;
    color: var(--gems-muted);
    margin-left: 6px;
}

.sidebar-footer {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed rgba(0,0,0,0.08);
    font-size: 0.78rem;
    color: var(--gems-muted);
}

.sidebar-bottom {
    margin-top: auto;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 150, 136, 0.06);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.78rem;
    margin-top: 6px;
}

.tag-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gems-primary);
}

.empty-state {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--gems-muted);
    border-radius: 12px;
    border: 1px dashed var(--gems-border-subtle);
    padding: 8px 10px;
}

/* main */

.main {
    flex: 1;
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.top-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.top-meta {
    font-size: 0.82rem;
    color: var(--gems-muted);
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    border-radius: 999px;
    padding: 4px 10px;
    background: #ffffffbb;
    border: 1px solid rgba(0,0,0,0.06);
}

.status-dot-green,
.status-dot-red {
    width: 8px;
    height: 8px;
    border-radius: 999px;
}

.status-dot-green {
    background: #2ecc71;
}

.status-dot-red {
    background: #e74c3c;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 14px;
    flex: 1;
}

.list-bullets {
    margin: 10px 0 0;
    padding-left: 18px;
    font-size: 0.9rem;
    color: var(--gems-muted);
}

.list-bullets li + li {
    margin-top: 4px;
}

.label {
    font-size: 0.8rem;
    color: var(--gems-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.stat {
    flex: 1;
    min-width: 110px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    padding: 8px 10px;
    font-size: 0.85rem;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--gems-muted);
}

.stat-value {
    font-weight: 600;
    margin-top: 2px;
}

.welcome-highlight {
    font-weight: 600;
    color: var(--gems-primary-dark);
}

/* ===========================
   R E S P O N S I V E
   =========================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        padding-bottom: 10px;
    }

    .main {
        padding: 12px 12px 16px;
    }

    .content-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 480px) {
    .card {
        padding: 18px 16px 16px;
    }

    .sidebar {
        padding: 10px 10px 8px 12px;
    }
}
