/* ═══════════════════════════════════════════════════════════
   183 Club — Member Management System: Frontend
   Dark, elegant, premium private-club aesthetic
   ═══════════════════════════════════════════════════════════ */

/* ─── Variables & Container ──────────────────────────────── */

.c183m-wrap {
    --bg: #0d0d0d;
    --surface: #1a1a1a;
    --surface-alt: #141414;
    --input-bg: #1e1e1e;
    --border: #2a2a2a;
    --border-focus: #b8945f;
    --text: #f5f0e8;
    --text-secondary: #a09888;
    --text-muted: #6b6158;
    --accent: #b8945f;
    --accent-hover: #c9a96e;
    --accent-glow: rgba(184, 148, 95, 0.15);
    --error: #c0544f;
    --error-bg: rgba(192, 84, 79, 0.08);
    --success: #5a8a65;
    --success-bg: rgba(90, 138, 101, 0.1);
    --warning: #c49a3c;
    --warning-bg: rgba(196, 154, 60, 0.1);
    --info: #5a7a9a;
    --info-bg: rgba(90, 122, 154, 0.1);
    --critical: #c0544f;
    --critical-bg: rgba(192, 84, 79, 0.08);
    --radius: 4px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --transition: 0.25s ease;

    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.7;
    font-weight: 300;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 24px 60px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.c183m-wrap *, .c183m-wrap *::before, .c183m-wrap *::after {
    box-sizing: border-box;
}

/* ─── Typography ─────────────────────────────────────────── */

.c183m-serif { font-family: var(--serif); font-weight: 400; }

.c183m-text-center { text-align: center; }
.c183m-text-muted { color: var(--text-muted); }
.c183m-text-sm { font-size: 13px; }

.c183m-emblem {
    font-size: 24px;
    color: var(--accent);
    margin-bottom: 16px;
    letter-spacing: 4px;
}

.c183m-subtitle {
    font-size: 13px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 24px;
    font-weight: 400;
}

.c183m-divider {
    width: 40px;
    height: 1px;
    background: var(--accent);
    margin: 0 auto 32px;
    opacity: 0.5;
}

.c183m-link {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}
.c183m-link:hover { color: var(--accent-hover); }

.c183m-back-link {
    display: inline-block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    margin-bottom: 16px;
    transition: color var(--transition);
}
.c183m-back-link:hover { color: var(--accent); }

/* ─── Cards ──────────────────────────────────────────────── */

.c183m-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    margin-bottom: 24px;
}

.c183m-card-heading {
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 400;
    color: var(--text);
    margin: 0 0 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

/* ─── Login ──────────────────────────────────────────────── */

.c183m-login-card {
    max-width: 440px;
    margin: 60px auto;
    text-align: center;
}

.c183m-login-header { margin-bottom: 32px; }

.c183m-login-card h1 {
    font-size: 28px;
    margin: 0 0 8px;
    letter-spacing: 1px;
}

/* ─── Forms ──────────────────────────────────────────────── */

.c183m-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.c183m-field label {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.c183m-field input[type="text"],
.c183m-field input[type="email"],
.c183m-field input[type="tel"],
.c183m-field input[type="password"],
.c183m-field input[type="date"],
.c183m-field textarea,
.c183m-field select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 300;
    padding: 14px 16px;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    width: 100%;
}

.c183m-field input:focus,
.c183m-field textarea:focus,
.c183m-field select:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.c183m-field input::placeholder,
.c183m-field textarea::placeholder {
    color: var(--text-muted);
    font-weight: 300;
}

.c183m-field textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

/* ─── Rows ───────────────────────────────────────────────── */

.c183m-row { display: flex; gap: 20px; }
.c183m-half { flex: 1; }
.c183m-third { flex: 1; }

.c183m-row-between {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

/* ─── Checkboxes ─────────────────────────────────────────── */

.c183m-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: 0;
    font-weight: 300;
}

.c183m-checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.c183m-check {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--input-bg);
    transition: all var(--transition);
    position: relative;
}

.c183m-check::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 9px;
    border: solid var(--bg);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s ease;
}

.c183m-checkbox-label input:checked ~ .c183m-check {
    background: var(--accent);
    border-color: var(--accent);
}

.c183m-checkbox-label input:checked ~ .c183m-check::after {
    transform: rotate(45deg) scale(1);
}

/* ─── Buttons ────────────────────────────────────────────── */

.c183m-btn {
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    padding: 14px 32px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.c183m-btn-primary {
    background: var(--accent);
    color: var(--bg);
}
.c183m-btn-primary:hover { background: var(--accent-hover); color: var(--bg); }

.c183m-btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.c183m-btn-ghost:hover {
    border-color: var(--text-secondary);
    color: var(--text);
}

.c183m-btn-sm { padding: 8px 20px; font-size: 11px; }

.c183m-btn-full { width: 100%; }

.c183m-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── Badges ─────────────────────────────────────────────── */

.c183m-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.6;
}

.c183m-badge-success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(90,138,101,0.2); }
.c183m-badge-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(196,154,60,0.2); }
.c183m-badge-critical { background: var(--critical-bg); color: var(--critical); border: 1px solid rgba(192,84,79,0.2); }
.c183m-badge-info { background: var(--info-bg); color: var(--info); border: 1px solid rgba(90,122,154,0.2); }
.c183m-badge-neutral { background: rgba(255,255,255,0.05); color: var(--text-muted); border: 1px solid var(--border); }

/* ─── Dashboard Header ──────────────────────────────────── */

.c183m-dash-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.c183m-dash-header h1 {
    font-size: 26px;
    margin: 0 0 10px;
    letter-spacing: 0.5px;
}

.c183m-dash-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.c183m-meta-sep { color: var(--text-muted); font-size: 10px; }
.c183m-meta-text { color: var(--text-secondary); font-size: 13px; }

/* ─── Alerts ─────────────────────────────────────────────── */

.c183m-alerts { margin-bottom: 28px; }

.c183m-alert {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-radius: var(--radius);
    margin-bottom: 10px;
    font-size: 14px;
    animation: c183mFadeIn 0.3s ease forwards;
}

.c183m-alert-warning {
    background: var(--warning-bg);
    border: 1px solid rgba(196,154,60,0.2);
    color: var(--warning);
}

.c183m-alert-info {
    background: var(--info-bg);
    border: 1px solid rgba(90,122,154,0.2);
    color: var(--info);
}

.c183m-alert-critical {
    background: var(--critical-bg);
    border: 1px solid rgba(192,84,79,0.2);
    color: var(--critical);
}

.c183m-alert-icon { font-size: 18px; flex-shrink: 0; }
.c183m-alert-text { flex: 1; }

.c183m-alert-action {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    padding: 6px 16px;
    border: 1px solid currentColor;
    border-radius: var(--radius);
    transition: all var(--transition);
}
.c183m-alert-action:hover {
    background: rgba(255,255,255,0.08);
    color: inherit;
}

/* ─── Status Panel ───────────────────────────────────────── */

.c183m-status-panel {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.c183m-status-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}

.c183m-status-label {
    display: block;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.c183m-status-value {
    display: block;
    font-size: 14px;
    color: var(--text);
}

/* ─── Action Grid ────────────────────────────────────────── */

.c183m-action-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.c183m-action-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.c183m-action-card:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
    color: var(--text);
    transform: translateY(-2px);
}

.c183m-action-primary {
    background: var(--accent-glow);
    border-color: var(--accent);
    grid-column: span 2;
}

.c183m-action-primary:hover {
    background: rgba(184,148,95,0.25);
}

.c183m-action-icon {
    font-size: 24px;
    color: var(--accent);
}

.c183m-action-label {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.c183m-action-card:hover .c183m-action-label { color: var(--text); }

/* ─── Sections ───────────────────────────────────────────── */

.c183m-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 24px;
}

.c183m-section-heading {
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 400;
    color: var(--text);
    margin: 0 0 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

/* ─── Notices Feed ───────────────────────────────────────── */

.c183m-notice-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.c183m-notice-item:last-child { border-bottom: none; }

.c183m-notice-item h3 {
    font-family: var(--serif);
    font-size: 16px;
    font-weight: 400;
    color: var(--text);
    margin: 0 0 6px;
}
.c183m-notice-item p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0 0 6px;
    line-height: 1.6;
}
.c183m-notice-date {
    font-size: 12px;
    color: var(--text-muted);
}

/* ─── Summary Grid ───────────────────────────────────────── */

.c183m-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.c183m-summary-item {
    background: var(--surface-alt);
    padding: 16px 20px;
}

.c183m-summary-label {
    display: block;
    font-size: 11px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.c183m-summary-value {
    font-size: 14px;
    color: var(--text);
}

/* ─── Detail Table (Profile) ─────────────────────────────── */

.c183m-detail-table { margin-bottom: 20px; }

.c183m-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.c183m-detail-row:last-child { border-bottom: none; }

.c183m-detail-label { color: var(--text-muted); }
.c183m-detail-value { color: var(--text); font-weight: 400; }

/* ─── Page Header ────────────────────────────────────────── */

.c183m-page-header {
    margin-bottom: 32px;
}

.c183m-page-header h1 {
    font-size: 26px;
    margin: 0 0 12px;
    letter-spacing: 0.5px;
}

/* ─── Notices (inline) ───────────────────────────────────── */

.c183m-notice-area .c183m-inline-notice {
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 20px;
    animation: c183mFadeIn 0.3s ease forwards;
}

.c183m-inline-notice.success {
    background: var(--success-bg);
    border: 1px solid rgba(90,138,101,0.25);
    color: var(--success);
}

.c183m-inline-notice.error {
    background: var(--error-bg);
    border: 1px solid rgba(192,84,79,0.25);
    color: #e8a09d;
}

/* ─── Animations ─────────────────────────────────────────── */

@keyframes c183mFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Focus-visible ──────────────────────────────────────── */

.c183m-field input:focus-visible,
.c183m-field textarea:focus-visible,
.c183m-field select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.c183m-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ─── Mobile ─────────────────────────────────────────────── */

@media (max-width: 768px) {
    .c183m-wrap { padding: 24px 16px 48px; }
    .c183m-card { padding: 28px 20px; }

    .c183m-dash-header {
        flex-direction: column;
        gap: 16px;
    }
    .c183m-dash-header h1 { font-size: 22px; }

    .c183m-status-panel {
        grid-template-columns: repeat(2, 1fr);
    }

    .c183m-action-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .c183m-action-primary { grid-column: span 2; }

    .c183m-summary-grid { grid-template-columns: 1fr; }

    .c183m-row { flex-direction: column; gap: 0; }
}

@media (max-width: 480px) {
    .c183m-status-panel { grid-template-columns: 1fr 1fr; }
    .c183m-action-grid { grid-template-columns: 1fr 1fr; }
    .c183m-action-primary { grid-column: span 2; }

    .c183m-login-card { padding: 28px 20px; margin: 24px auto; }

    .c183m-dash-meta { flex-direction: column; align-items: flex-start; gap: 6px; }
    .c183m-meta-sep { display: none; }

    .c183m-btn { padding: 12px 24px; font-size: 12px; }
}
