/* ============================================================
   Polyculy — Styles
   Color palette: soft purples, pinks, lavenders
   ============================================================ */

:root {
    --purple-50: #FAF5FF;
    --purple-100: #F3E8FF;
    --purple-200: #E9D5FF;
    --purple-300: #D8B4FE;
    --purple-400: #C084FC;
    --purple-500: #A855F7;
    --purple-600: #9333EA;
    --purple-700: #7C3AED;
    --purple-800: #6D28D9;
    --purple-900: #581C87;
    --pink-200: #FBCFE8;
    --pink-300: #F9A8D4;
    --pink-400: #F472B6;
    --pink-500: #EC4899;
    --lavender: #C4B5FD;
    --green: #22C55E;
    --blue: #3B82F6;
    --yellow: #F59E0B;
    --red: #EF4444;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-500: #6B7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--gray-700);
    background: linear-gradient(135deg, var(--purple-100) 0%, var(--pink-200) 50%, var(--lavender) 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* ---- Navbar ---- */
.navbar-polyculy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(139,92,246,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}
.navbar-brand-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}
.brand-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--purple-800);
    letter-spacing: -0.02em;
}
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.nav-action-link {
    color: var(--purple-600);
    font-size: 1.1rem;
    text-decoration: none;
    transition: color 0.2s;
}
.nav-action-link:hover { color: var(--purple-800); }

/* Notification Bell */
.notification-bell {
    position: relative;
    cursor: pointer;
    color: var(--purple-600);
    font-size: 1.2rem;
}
.notification-badge {
    position: absolute;
    top: -6px; right: -8px;
    background: var(--red);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}
.notification-panel {
    position: absolute;
    top: 56px;
    right: 1.5rem;
    width: 360px;
    max-height: 420px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 1100;
    overflow: hidden;
}
.notif-header {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.85rem;
}
.notif-header a { color: var(--purple-600); text-decoration: none; font-size: 0.8rem; }
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: background 0.15s;
}
.notif-item:hover { background: var(--purple-50); }
.notif-item.unread { background: var(--purple-50); }
.notif-item .notif-icon {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--purple-100);
    color: var(--purple-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}
.notif-item .notif-text { font-size: 0.82rem; line-height: 1.3; }
.notif-item .notif-time { font-size: 0.7rem; color: var(--gray-500); margin-top: 2px; }
.notif-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 1050;
}

/* User Avatar */
.user-avatar-nav {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple-400), var(--pink-400));
    display: flex;
    align-items: center;
    justify-content: center;
}
.avatar-initials {
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
}

/* ---- Main Content ---- */
.main-content {
    padding: 1.5rem;
    max-width: 1280px;
    margin: 0 auto;
    min-height: calc(100vh - 120px);
}

/* ---- Cards ---- */
.card-polyculy {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(8px);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(139,92,246,0.08);
    padding: 1.5rem;
}

/* ---- Page Headers ---- */
.page-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--purple-800);
    margin-bottom: 0.5rem;
}
.page-subtitle {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* ---- Auth Pages (Login/Signup) ---- */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--purple-200) 0%, var(--pink-200) 40%, var(--lavender) 100%);
    position: relative;
    overflow: hidden;
}
.auth-wrapper::before {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(236,72,153,0.15) 0%, transparent 70%);
    top: 10%; left: 5%;
    border-radius: 50%;
}
.auth-wrapper::after {
    content: '';
    position: absolute;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(168,85,247,0.12) 0%, transparent 70%);
    bottom: 15%; right: 10%;
    border-radius: 50%;
}
.auth-card {
    background: rgba(255,255,255,0.95);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
    text-align: center;
}
.auth-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
}
.auth-logo .brand-text {
    font-size: 2rem;
    margin-top: 0.5rem;
}
.auth-tagline {
    color: var(--purple-600);
    font-size: 1.1rem;
    font-weight: 500;
    font-style: italic;
    margin-bottom: 1rem;
}
.auth-subtitle {
    color: var(--gray-500);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

/* ---- Form Styling ---- */
.form-control-polyculy {
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.85rem 0.6rem 2.5rem;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}
.form-control-polyculy:focus {
    border-color: var(--purple-400);
    box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
    outline: none;
}
.input-icon-group {
    position: relative;
    margin-bottom: 1rem;
}
.input-icon-group .input-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
    font-size: 0.9rem;
}
.input-icon-group .password-toggle {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
    cursor: pointer;
}

/* ---- Buttons ---- */
.btn-primary-polyculy {
    background: var(--purple-700);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.65rem 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    width: 100%;
}
.btn-primary-polyculy:hover {
    background: var(--purple-800);
    transform: translateY(-1px);
}
.btn-secondary-polyculy {
    background: transparent;
    color: var(--purple-700);
    border: 1.5px solid var(--purple-300);
    border-radius: var(--radius-sm);
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-secondary-polyculy:hover {
    background: var(--purple-50);
    border-color: var(--purple-500);
}
.btn-ghost {
    background: none;
    border: 1px solid var(--gray-200);
    color: var(--gray-700);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-ghost:hover { background: var(--gray-100); border-color: var(--gray-300); }
.btn-danger {
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
}

.auth-link { color: var(--purple-600); text-decoration: none; font-weight: 500; }
.auth-link:hover { text-decoration: underline; }

/* ---- Two-Column Layout (Connections page) ---- */
.two-col-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
    align-items: start;
}
@media (max-width: 768px) {
    .two-col-layout { grid-template-columns: 1fr; }
}

/* ---- Polycule Sidebar ---- */
.polycule-sidebar {
    background: rgba(255,255,255,0.9);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 1.25rem;
}
.polycule-sidebar h3 {
    color: var(--purple-800);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.member-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
    position: relative;
}
.member-row:hover { background: var(--purple-50); }
.member-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple-300), var(--pink-300));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #fff;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.member-info { flex: 1; min-width: 0; }
.member-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-900);
}
.member-status {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
}
.status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.status-connected { background: var(--green); }
.status-awaiting-confirmation { background: var(--blue); }
.status-awaiting-signup { background: var(--yellow); }
.status-licence-gifted { background: var(--purple-500); }
.status-revoked { background: var(--red); }

.member-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

/* Context Menu */
.context-menu {
    position: absolute;
    right: 0;
    top: 100%;
    background: #fff;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    z-index: 200;
    padding: 0.3rem 0;
    display: none;
}
.context-menu.show { display: block; }
.context-menu-item {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--gray-700);
    transition: background 0.15s;
}
.context-menu-item:hover { background: var(--purple-50); }
.context-menu-item.disabled { opacity: 0.4; pointer-events: none; }
.context-menu-item.danger { color: var(--red); }

/* ---- Calendar Setup Cards ---- */
.setup-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}
@media (max-width: 768px) {
    .setup-cards { grid-template-columns: 1fr; }
}
.setup-card {
    background: rgba(255,255,255,0.9);
    border: 2px solid var(--purple-200);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.setup-card:hover {
    border-color: var(--purple-400);
    box-shadow: var(--shadow-md);
}
.setup-card-icon {
    font-size: 2.5rem;
    color: var(--purple-500);
    margin-bottom: 1rem;
}
.setup-card h4 {
    color: var(--purple-800);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}
.setup-card p {
    color: var(--gray-500);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* ---- Calendar Views ---- */
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}
.calendar-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.calendar-nav .month-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--purple-800);
    min-width: 180px;
    text-align: center;
}
.calendar-nav button {
    background: none;
    border: 1px solid var(--purple-200);
    color: var(--purple-600);
    border-radius: 50%;
    width: 32px; height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.calendar-nav button:hover { background: var(--purple-100); }

.view-toggles {
    display: flex;
    gap: 0.25rem;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    padding: 3px;
}
.view-toggle-btn {
    padding: 0.35rem 0.9rem;
    border: none;
    background: none;
    color: var(--gray-500);
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.view-toggle-btn.active {
    background: #fff;
    color: var(--purple-700);
    box-shadow: var(--shadow-sm);
}

.event-buttons {
    display: flex;
    gap: 0.5rem;
}
.btn-event {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}
.btn-event-personal {
    background: var(--purple-600);
    color: #fff;
}
.btn-event-personal:hover { background: var(--purple-700); }
.btn-event-shared {
    background: var(--purple-500);
    color: #fff;
}
.btn-event-shared:hover { background: var(--purple-600); }

/* Month Grid */
.calendar-grid {
    background: rgba(255,255,255,0.9);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}
.calendar-grid table {
    width: 100%;
    border-collapse: collapse;
}
.calendar-grid th {
    background: var(--purple-100);
    color: var(--purple-700);
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.6rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.calendar-grid td {
    border: 1px solid var(--gray-200);
    vertical-align: top;
    height: 100px;
    padding: 0.25rem;
    width: 14.28%;
}
.calendar-grid td.other-month { background: var(--gray-50); opacity: 0.5; }
.calendar-grid td.today { background: rgba(124,58,237,0.05); }
.day-number {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-500);
    padding: 2px 6px;
}
.day-number.today {
    background: var(--purple-600);
    color: #fff;
    border-radius: 50%;
    width: 24px; height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Calendar Events */
.cal-event {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.72rem;
    margin-bottom: 2px;
    cursor: pointer;
    transition: opacity 0.15s;
    color: #fff;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.cal-event:hover { opacity: 0.85; }
.cal-event.personal { background: var(--purple-500); }
.cal-event.shared-active { background: linear-gradient(135deg, var(--purple-400), var(--pink-400)); }
.cal-event.shared-tentative {
    background: var(--purple-200);
    color: var(--purple-700);
    border: 1px dashed var(--purple-400);
}
.cal-event.overlay {
    opacity: 1;
}
.cal-event .event-avatar {
    width: 16px; height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}
.cal-event .participant-dots {
    display: flex;
    gap: 2px;
    margin-left: auto;
}
.cal-event .participant-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.cal-event .dot-overflow {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.8);
}

/* Week View */
.week-grid {
    background: rgba(255,255,255,0.9);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow-x: auto;
}
.week-grid table { width: 100%; border-collapse: collapse; min-width: 700px; }
.week-grid th {
    background: var(--purple-100);
    color: var(--purple-700);
    font-weight: 600;
    font-size: 0.78rem;
    padding: 0.5rem;
    text-align: center;
    border: 1px solid var(--gray-200);
}
.week-grid td {
    border: 1px solid var(--gray-200);
    height: 40px;
    position: relative;
    vertical-align: top;
}
.week-grid td .time-label {
    font-size: 0.7rem;
    color: var(--gray-500);
    padding: 2px 4px;
}
.current-time-line {
    position: absolute;
    left: 0; right: 0;
    height: 2px;
    background: var(--red);
    z-index: 10;
}
.current-time-line::before {
    content: '';
    position: absolute;
    left: -4px; top: -3px;
    width: 8px; height: 8px;
    background: var(--red);
    border-radius: 50%;
}

/* ---- Bottom Toggle Bar ---- */
.calendar-toggle-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.9);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-top: 1rem;
    flex-wrap: wrap;
}
.toggle-pill {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1.5px solid var(--gray-200);
    background: #fff;
}
.toggle-pill.active {
    border-color: currentColor;
    background: rgba(124,58,237,0.05);
}
.toggle-pill .pill-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.toggle-pill .pill-switch {
    width: 28px; height: 16px;
    border-radius: 8px;
    background: var(--gray-200);
    position: relative;
    transition: background 0.2s;
}
.toggle-pill.active .pill-switch { background: var(--purple-500); }
.toggle-pill .pill-switch::after {
    content: '';
    position: absolute;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #fff;
    top: 2px; left: 2px;
    transition: transform 0.2s;
}
.toggle-pill.active .pill-switch::after { transform: translateX(12px); }

/* ---- Modals ---- */
.modal-polyculy .modal-content {
    border-radius: var(--radius);
    border: none;
    box-shadow: var(--shadow-lg);
}
.modal-polyculy .modal-header {
    background: var(--purple-50);
    border-bottom: 1px solid var(--purple-100);
    padding: 1rem 1.25rem;
}
.modal-polyculy .modal-title {
    color: var(--purple-800);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.modal-polyculy .modal-body { padding: 1.25rem; }
.modal-polyculy .modal-footer {
    border-top: 1px solid var(--gray-200);
    padding: 0.75rem 1.25rem;
}

/* Accordion in modals */
.section-accordion {
    border: 1.5px solid var(--purple-200);
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    overflow: hidden;
}
.section-accordion .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--purple-50);
    cursor: pointer;
    font-weight: 600;
    color: var(--purple-700);
    font-size: 0.9rem;
}
.section-accordion .section-header .required-marker { color: var(--red); margin-left: 4px; }
.section-accordion .section-body { padding: 1rem; display: none; }
.section-accordion.open .section-body { display: block; }
.section-accordion .section-summary {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: var(--gray-500);
    display: none;
}
.section-accordion:not(.open) .section-summary { display: block; }

/* Sharing Controls */
.sharing-tier {
    margin-bottom: 0.75rem;
}
.sharing-tier label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
}
.sharing-audience {
    margin-left: 1.75rem;
    margin-top: 0.4rem;
}
.sharing-audience label {
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--gray-500);
}
.sharing-people {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.4rem;
    margin-left: 1.25rem;
}
.sharing-people label {
    font-size: 0.82rem;
    font-weight: 400;
}

/* ---- Invite Others ---- */
.invite-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-100);
}
.invite-row .invite-color {
    width: 12px; height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}
.invite-row .invite-name {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
}
.invite-row .attendance-toggle {
    display: flex;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    overflow: hidden;
    font-size: 0.75rem;
}
.attendance-toggle button {
    padding: 0.2rem 0.5rem;
    border: none;
    background: none;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.15s;
}
.attendance-toggle button.active {
    background: var(--purple-600);
    color: #fff;
}
.attendance-toggle button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ---- Event Invitation Card ---- */
.invitation-card {
    background: rgba(255,255,255,0.95);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--purple-500);
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.invitation-card .inv-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.invitation-card .inv-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--purple-800);
}
.invitation-card .inv-meta {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 0.75rem;
}
.invitation-card .inv-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.inv-status-note {
    font-size: 0.8rem;
    color: var(--gray-500);
    font-style: italic;
    margin-top: 0.75rem;
}
.conflict-note {
    background: #FEF3C7;
    border: 1px solid #F59E0B;
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    font-size: 0.82rem;
    color: #92400E;
    margin-bottom: 0.75rem;
}

/* ---- Batch Decision Table (Revocation) ---- */
.batch-table {
    width: 100%;
    font-size: 0.85rem;
}
.batch-table th {
    background: var(--purple-50);
    color: var(--purple-700);
    font-weight: 600;
    padding: 0.5rem;
    text-align: left;
}
.batch-table td { padding: 0.5rem; border-bottom: 1px solid var(--gray-100); }

/* ---- Proposal Cards ---- */
.proposal-card {
    background: var(--purple-50);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--purple-200);
}
.proposal-card .proposal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.proposal-status {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}
.proposal-status.active { background: #DBEAFE; color: #1D4ED8; }
.proposal-status.accepted { background: #D1FAE5; color: #059669; }
.proposal-status.rejected { background: #FEE2E2; color: #DC2626; }
.proposal-status.withdrawn { background: var(--gray-200); color: var(--gray-500); }

/* ---- Settings Pages ---- */
.settings-section {
    background: rgba(255,255,255,0.92);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.settings-section h4 {
    color: var(--purple-800);
    font-size: 1rem;
    margin-bottom: 1rem;
}
.pref-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--gray-100);
}
.pref-row:last-child { border-bottom: none; }
.pref-row .pref-label { font-size: 0.88rem; }

/* Toggle switch */
.toggle-switch {
    position: relative;
    width: 40px; height: 22px;
    cursor: pointer;
}
.toggle-switch input { display: none; }
.toggle-switch .slider {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--gray-200);
    border-radius: 11px;
    transition: background 0.2s;
}
.toggle-switch .slider::after {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #fff;
    top: 2px; left: 2px;
    transition: transform 0.2s;
    box-shadow: var(--shadow-sm);
}
.toggle-switch input:checked + .slider { background: var(--purple-600); }
.toggle-switch input:checked + .slider::after { transform: translateX(18px); }

/* ---- Footer ---- */
.app-footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.75rem;
    color: var(--gray-500);
}
.app-footer a {
    color: var(--purple-500);
    text-decoration: none;
}
.app-footer a:hover { text-decoration: underline; }

/* ---- Tooltips ---- */
.event-tooltip {
    position: absolute;
    background: #fff;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 0.75rem 1rem;
    font-size: 0.82rem;
    z-index: 500;
    max-width: 250px;
    pointer-events: none;
}
.event-tooltip .tooltip-title { font-weight: 600; color: var(--purple-800); margin-bottom: 0.25rem; }
.event-tooltip .tooltip-participants {
    display: flex;
    gap: 4px;
    margin-top: 0.25rem;
}

/* ---- Helpers ---- */
.text-purple { color: var(--purple-700); }
.text-muted-sm { font-size: 0.82rem; color: var(--gray-500); }
.helper-text { font-size: 0.82rem; color: var(--gray-500); line-height: 1.5; margin-top: 0.5rem; }
.form-label-polyculy { font-weight: 600; font-size: 0.85rem; color: var(--gray-700); margin-bottom: 0.3rem; }
.alert-inline {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    margin-bottom: 0.75rem;
}
.alert-inline.error { background: #FEE2E2; color: #DC2626; border: 1px solid #FCA5A5; }
.alert-inline.success { background: #D1FAE5; color: #059669; border: 1px solid #6EE7B7; }
.alert-inline.info { background: #DBEAFE; color: #1D4ED8; border: 1px solid #93C5FD; }
.alert-inline.warning { background: #FEF3C7; color: #92400E; border: 1px solid #FCD34D; }


.btn-purple {
  background-color: #a372e0; /* $purple-400 */
  border-color: #a372e0;
  color: white; /* Or another suitable color */
}

.btn-purple:hover,
.btn-purple:focus,
.btn-purple:active {
  background-color: #9063c9; /* Slightly darker shade for hover */
  border-color: #9063c9;
  color: white;
}