/* ==========================================
   DASHBOARD FAMILY - AILEM SAYFASI
   ========================================== */

.family-container {
    max-width: 460px;
    margin: 0 auto;
    padding: 20px 16px 36px;
}

/* Sayfa Başlığı */
.family-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 12px;
}

.family-page-title {
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: -0.3px;
    background: linear-gradient(135deg, #5B6AE8, #7B62ED, #A068F5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

/* ==========================================
   AİLE SWITCHER
   ========================================== */

.family-switcher {
    position: relative;
}

.family-switcher-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(107, 120, 240, 0.1);
    border: 1.5px solid rgba(107, 120, 240, 0.22);
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #5b5fc7;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 4px rgba(107, 120, 240, 0.08);
}

.family-switcher-btn:hover {
    background: rgba(107, 120, 240, 0.15);
    border-color: rgba(107, 120, 240, 0.32);
    box-shadow: 0 2px 8px rgba(107, 120, 240, 0.12);
}

.family-switcher-btn .switcher-family-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.family-switcher-btn .switcher-arrow {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.family-switcher-dropdown.open + .family-switcher-btn .switcher-arrow,
.family-switcher-btn:has(+ .family-switcher-dropdown.open) .switcher-arrow {
    transform: rotate(180deg);
}

.family-switcher-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(107, 120, 240, 0.18);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 100;
}

.family-switcher-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.switcher-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.switcher-family-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.switcher-family-item:hover {
    background: rgba(107, 120, 240, 0.06);
}

.switcher-family-item.active {
    background: rgba(107, 120, 240, 0.08);
    cursor: default;
}

.switcher-family-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.switcher-family-info .switcher-family-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #243769;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.switcher-family-role {
    font-size: 0.68rem;
    color: #6b78f0;
    opacity: 0.7;
}

.switcher-check {
    font-size: 14px;
    color: #6b78f0;
    font-weight: 600;
}

.switcher-divider {
    height: 1px;
    background: rgba(107, 120, 240, 0.1);
    margin: 6px 0;
}

.switcher-create-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    background: none;
    border: none;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #6b78f0;
    cursor: pointer;
    transition: all 0.15s ease;
}

.switcher-create-btn:hover {
    background: rgba(107, 120, 240, 0.06);
}

.switcher-create-btn .create-icon {
    font-size: 12px;
}

/* Kart */
.family-card {
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.92) 0%,
        rgba(255, 255, 255, 0.72) 100%
    );
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 32px;
    overflow: hidden;
    box-shadow:
        0 12px 40px rgba(107, 120, 240, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.04),
        inset 0 2px 0 rgba(255, 255, 255, 0.9),
        inset 0 -2px 0 rgba(0, 0, 0, 0.02);
    margin-bottom: 14px;
    position: relative;
}

.family-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 12px;
}

.card-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header-icon {
    font-size: 18px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(107, 120, 240, 0.1), rgba(148, 112, 245, 0.06));
    border-radius: 10px;
    flex-shrink: 0;
}

.card-header-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: #243769;
    margin: 0;
}

/* Ekle Butonu */
.add-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #6b78f0, #9470f5);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 2px 8px rgba(107, 120, 240, 0.3);
}

.add-btn-icon {
    font-size: 12px;
}

/* Üye Sayısı */
.member-count {
    font-size: 0.78rem;
    font-weight: 600;
    color: #6b78f0;
    background: rgba(107, 120, 240, 0.08);
    padding: 4px 10px;
    border-radius: 8px;
}

/* ==========================================
   ÇOCUKLAR GRID
   ========================================== */

.children-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 18px 16px;
}

.child-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(107, 120, 240, 0.04);
    border-radius: 12px;
    flex: 1;
    min-width: calc(50% - 5px);
}

.child-card-avatar {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(107, 120, 240, 0.08);
    border-radius: 50%;
    flex-shrink: 0;
}

.child-card-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.child-card-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #243769;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.child-card-age {
    font-size: 0.7rem;
    color: #243769;
    opacity: 0.5;
}

.child-card-activity {
    font-size: 0.65rem;
    color: #6b78f0;
    opacity: 0.6;
}

.child-card-edit {
    margin-left: auto;
    width: 24px;
    height: 24px;
    background: transparent;
    border: 1.5px solid rgba(107, 114, 128, 0.3);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    opacity: 0;
    flex-shrink: 0;
    color: #6b7280;
}

.child-card:hover .child-card-edit {
    opacity: 0.7;
}

.child-card-edit:hover {
    opacity: 1;
    background: rgba(107, 120, 240, 0.08);
    border-color: #6b78f0;
    color: #6b78f0;
}

.child-card:hover {
    background: rgba(107, 120, 240, 0.08);
}

/* Mobile: always show edit button */
@media (hover: none) {
    .child-card-edit {
        opacity: 0.5;
    }
}

.children-empty {
    text-align: center;
    padding: 20px 18px;
}

.children-empty .empty-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

.children-empty .empty-text {
    font-size: 0.82rem;
    color: #243769;
    opacity: 0.5;
    margin: 0;
}

/* ==========================================
   ÜYE LİSTESİ
   ========================================== */

.members-list {
    padding: 0 18px 16px;
}

.member-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(107, 120, 240, 0.06);
}

.member-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.member-avatar {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6b78f0, #9470f5);
    border-radius: 50%;
    color: white;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}

.member-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.member-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #243769;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-email {
    font-size: 0.72rem;
    color: #243769;
    opacity: 0.4;
}

.member-badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    flex-shrink: 0;
}

.member-badge.owner {
    background: rgba(107, 120, 240, 0.1);
    color: #6b78f0;
}

.member-badge.member {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.member-transfer-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 158, 11, 0.08);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.member-transfer-btn:hover {
    background: rgba(245, 158, 11, 0.15);
}

.member-remove-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.08);
    border: none;
    border-radius: 8px;
    color: #ef4444;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.member-remove-btn:hover {
    background: rgba(239, 68, 68, 0.15);
}

/* Aileden Ayrıl */
.leave-family-container {
    padding: 12px 18px 16px;
    text-align: center;
    border-top: 1px solid rgba(107, 120, 240, 0.08);
}

.leave-family-btn {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 20px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.leave-family-btn:hover {
    background: rgba(239, 68, 68, 0.08);
}

/* ==========================================
   DAVET FORMU
   ========================================== */

.invite-form {
    padding: 0 18px 16px;
}

.invite-input-group {
    display: flex;
    gap: 8px;
}

.invite-input {
    flex: 1;
    padding: 10px 14px;
    font-size: 0.88rem;
    color: #243769;
    background: rgba(107, 120, 240, 0.04);
    border: 1.5px solid rgba(107, 120, 240, 0.12);
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
}

.invite-input:focus {
    border-color: #6b78f0;
    box-shadow: 0 0 0 3px rgba(107, 120, 240, 0.1);
}

.invite-input::placeholder {
    color: #243769;
    opacity: 0.3;
}

.invite-btn {
    padding: 10px 18px;
    background: linear-gradient(135deg, #6b78f0, #9470f5);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.invite-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 3px 10px rgba(107, 120, 240, 0.3);
}

.invite-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.invite-hint {
    font-size: 0.72rem;
    color: #243769;
    opacity: 0.4;
    margin: 8px 0 0;
    line-height: 1.4;
}

/* Bekleyen Davetler */
.pending-section {
    padding: 0 18px 16px;
    border-top: 1px solid rgba(107, 120, 240, 0.06);
}

.pending-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: #243769;
    opacity: 0.6;
    margin: 14px 0 10px;
}

.pending-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(107, 120, 240, 0.04);
}

.pending-item:last-child {
    border-bottom: none;
}

.pending-email {
    flex: 1;
    font-size: 0.82rem;
    color: #243769;
    opacity: 0.7;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pending-status {
    font-size: 0.68rem;
    font-weight: 600;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
}

.pending-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.pending-resend-btn,
.pending-cancel-btn {
    padding: 6px 12px;
    font-size: 0.72rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pending-resend-btn {
    background: rgba(107, 120, 240, 0.12);
    color: #6b78f0;
}

.pending-resend-btn:hover {
    background: rgba(107, 120, 240, 0.2);
}

.pending-cancel-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.pending-cancel-btn:hover {
    background: rgba(239, 68, 68, 0.18);
}

/* ==========================================
   DAVET KABUL SAYFASI
   ========================================== */

.invite-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.invite-card {
    text-align: center;
    padding: 36px 24px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 22px;
    box-shadow: 0 4px 24px rgba(107, 120, 240, 0.12);
    width: 100%;
}

.invite-icon {
    font-size: 56px;
    margin-bottom: 16px;
    display: block;
}

.invite-title {
    font-size: 22px;
    font-weight: 700;
    color: #243769;
    margin: 0 0 12px;
}

.invite-message {
    font-size: 0.92rem;
    color: #4B5563;
    line-height: 1.6;
    margin: 0 0 8px;
}

.invite-detail {
    font-size: 0.82rem;
    color: #243769;
    opacity: 0.5;
    line-height: 1.5;
    margin: 0 0 24px;
}

.invite-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.invite-accept-btn {
    padding: 12px 28px;
    background: linear-gradient(135deg, #6b78f0, #9470f5);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.invite-accept-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 14px rgba(107, 120, 240, 0.3);
}

.invite-reject-btn {
    padding: 12px 28px;
    background: rgba(239, 68, 68, 0.08);
    border: none;
    border-radius: 12px;
    color: #ef4444;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.invite-loading-icon {
    font-size: 42px;
    margin-bottom: 12px;
    animation: pulse 1.5s ease-in-out infinite;
}

.invite-loading-text {
    font-size: 0.88rem;
    color: #243769;
    opacity: 0.5;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ==========================================
   ONAY MODAL
   ========================================== */

.confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.confirm-modal .modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.confirm-sheet {
    position: relative;
    z-index: 2;
    background: white;
    border-radius: 22px 22px 0 0;
    padding: 28px 24px 36px;
    width: 100%;
    max-width: 460px;
    text-align: center;
}

.confirm-icon {
    font-size: 42px;
    margin-bottom: 12px;
}

.confirm-title {
    font-size: 18px;
    font-weight: 700;
    color: #243769;
    margin: 0 0 8px;
}

.confirm-text {
    font-size: 0.85rem;
    color: #4B5563;
    margin: 0 0 24px;
    line-height: 1.5;
}

.confirm-buttons {
    display: flex;
    gap: 10px;
}

.confirm-cancel-btn {
    flex: 1;
    padding: 12px;
    background: rgba(107, 120, 240, 0.06);
    border: none;
    border-radius: 12px;
    color: #243769;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

.confirm-action-btn {
    flex: 1;
    padding: 12px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

/* Yeni Aile Oluştur Modal - Input */
.create-family-input-wrapper {
    margin-bottom: 20px;
}

.create-family-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 0.95rem;
    color: #243769;
    background: rgba(107, 120, 240, 0.04);
    border: 1.5px solid rgba(107, 120, 240, 0.15);
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
    text-align: center;
    box-sizing: border-box;
}

.create-family-input:focus {
    border-color: #6b78f0;
    box-shadow: 0 0 0 3px rgba(107, 120, 240, 0.1);
}

.create-family-input::placeholder {
    color: #243769;
    opacity: 0.35;
}

.confirm-action-btn.create-family-submit {
    background: linear-gradient(135deg, #6b78f0, #9470f5);
}

.confirm-action-btn.create-family-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================
   OWNER LEAVE - ÜYE SEÇİM
   ========================================== */

.owner-leave-members {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    max-height: 200px;
    overflow-y: auto;
}

.owner-leave-member {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(107, 120, 240, 0.04);
    border: 2px solid transparent;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.owner-leave-member:hover {
    background: rgba(107, 120, 240, 0.08);
}

.owner-leave-member.selected {
    background: rgba(107, 120, 240, 0.08);
    border-color: #6b78f0;
}

.owner-leave-member-avatar {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6b78f0, #9470f5);
    border-radius: 50%;
    color: white;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.owner-leave-member-name {
    flex: 1;
    font-size: 0.88rem;
    font-weight: 600;
    color: #243769;
    text-align: left;
}

.owner-leave-member-radio {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(107, 120, 240, 0.25);
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.owner-leave-member.selected .owner-leave-member-radio {
    border-color: #6b78f0;
    background: #6b78f0;
}

.owner-leave-member.selected .owner-leave-member-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

/* ==========================================
   TOAST
   ========================================== */

.toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    background: rgba(255, 255, 255, 0.98);
    color: #243769;
    padding: 12px 18px;
    border-radius: 12px;
    box-shadow: 0 3px 14px rgba(107, 120, 240, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    z-index: 2000;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.toast.success .toast-icon { color: #22c55e; }
.toast.error .toast-icon { color: #ef4444; }
.toast-icon { font-size: 15px; }

/* ==========================================
   DARK MODE
   ========================================== */

body.dark .family-page-title {
    background: linear-gradient(135deg, #8B9CF8, #B890FC);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Dark Mode - Switcher */
body.dark .family-switcher-btn {
    background: rgba(148, 112, 245, 0.12);
    border-color: rgba(148, 112, 245, 0.25);
    color: #c4b5fd;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

body.dark .family-switcher-btn:hover {
    background: rgba(148, 112, 245, 0.18);
    border-color: rgba(148, 112, 245, 0.35);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.dark .family-switcher-dropdown {
    background: rgba(15, 10, 45, 0.98);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
}

body.dark .switcher-family-item:hover {
    background: rgba(148, 112, 245, 0.1);
}

body.dark .switcher-family-item.active {
    background: rgba(148, 112, 245, 0.14);
}

body.dark .switcher-family-info .switcher-family-name {
    color: rgba(255, 255, 255, 0.92);
}

body.dark .switcher-family-role {
    color: #c4b5fd;
}

body.dark .switcher-check {
    color: #a78bfa;
}

body.dark .switcher-divider {
    background: rgba(148, 112, 245, 0.15);
}

body.dark .switcher-create-btn {
    color: #a78bfa;
}

body.dark .switcher-create-btn:hover {
    background: rgba(148, 112, 245, 0.1);
}

body.dark .family-card {
    background: linear-gradient(
        145deg,
        rgba(25, 18, 60, 0.7) 0%,
        rgba(15, 10, 45, 0.85) 100%
    );
    border-color: rgba(148, 112, 245, 0.25);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.35),
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.08),
        inset 0 -2px 0 rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

body.dark .card-header-icon {
    background: linear-gradient(145deg, rgba(148, 112, 245, 0.15), rgba(107, 120, 240, 0.1));
}

body.dark .card-header-title {
    color: rgba(255, 255, 255, 0.92);
}

body.dark .member-count {
    background: rgba(148, 112, 245, 0.15);
    color: #a78bfa;
}

body.dark .child-card {
    background: rgba(148, 112, 245, 0.08);
}

body.dark .child-card-avatar {
    background: rgba(148, 112, 245, 0.15);
}

body.dark .child-card-name {
    color: rgba(255, 255, 255, 0.92);
}

body.dark .child-card-age {
    color: rgba(255, 255, 255, 0.7);
}

body.dark .child-card-activity {
    color: #c4b5fd;
    opacity: 1;
}

body.dark .child-card:hover {
    background: rgba(148, 112, 245, 0.15);
}

body.dark .child-card-edit {
    border-color: rgba(167, 139, 250, 0.3);
    color: #a78bfa;
}

body.dark .child-card-edit:hover {
    background: rgba(148, 112, 245, 0.15);
    border-color: #a78bfa;
    color: #a78bfa;
}

body.dark .children-empty .empty-text {
    color: rgba(255, 255, 255, 0.6);
}

body.dark .member-avatar {
    background: linear-gradient(135deg, rgba(107, 120, 240, 0.8), rgba(148, 112, 245, 0.8));
}

body.dark .member-name {
    color: rgba(255, 255, 255, 0.92);
}

body.dark .member-email {
    color: rgba(255, 255, 255, 0.6);
}

body.dark .member-item {
    border-bottom-color: rgba(148, 112, 245, 0.1);
}

body.dark .member-badge.owner {
    background: rgba(148, 112, 245, 0.15);
    color: #a78bfa;
}

body.dark .member-badge.member {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
}

body.dark .member-transfer-btn {
    background: rgba(245, 158, 11, 0.12);
}

body.dark .member-remove-btn {
    background: rgba(239, 68, 68, 0.12);
}

body.dark .leave-family-container {
    border-top-color: rgba(148, 112, 245, 0.12);
}

body.dark .leave-family-btn {
    color: #f87171;
}

body.dark .leave-family-btn:hover {
    background: rgba(239, 68, 68, 0.12);
}

body.dark .invite-input {
    background: rgba(148, 112, 245, 0.08);
    border-color: rgba(148, 112, 245, 0.15);
    color: rgba(255, 255, 255, 0.92);
}

body.dark .invite-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

body.dark .invite-input:focus {
    border-color: #a78bfa;
    box-shadow: 0 0 0 3px rgba(148, 112, 245, 0.15);
}

body.dark .invite-hint {
    color: rgba(255, 255, 255, 0.55);
}

body.dark .pending-section {
    border-top-color: rgba(148, 112, 245, 0.1);
}

body.dark .pending-title {
    color: rgba(255, 255, 255, 0.7);
}

body.dark .pending-email {
    color: rgba(255, 255, 255, 0.75);
}

body.dark .invite-card {
    background: rgba(25, 18, 60, 0.9);
    backdrop-filter: blur(10px);
}

body.dark .invite-title {
    color: rgba(255, 255, 255, 0.92);
}

body.dark .invite-message {
    color: rgba(255, 255, 255, 0.7);
}

body.dark .invite-detail {
    color: rgba(255, 255, 255, 0.6);
}

body.dark .invite-loading-text {
    color: rgba(255, 255, 255, 0.5);
}

body.dark .confirm-sheet {
    background: #120e38;
}

body.dark .confirm-title {
    color: rgba(255, 255, 255, 0.92);
}

body.dark .confirm-text {
    color: rgba(255, 255, 255, 0.75);
}

body.dark .confirm-cancel-btn {
    background: rgba(148, 112, 245, 0.12);
    color: rgba(255, 255, 255, 0.8);
}

body.dark .create-family-input {
    background: rgba(148, 112, 245, 0.08);
    border-color: rgba(148, 112, 245, 0.18);
    color: rgba(255, 255, 255, 0.92);
}

body.dark .create-family-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

body.dark .create-family-input:focus {
    border-color: #a78bfa;
    box-shadow: 0 0 0 3px rgba(148, 112, 245, 0.15);
}

body.dark .owner-leave-member {
    background: rgba(148, 112, 245, 0.08);
    border-color: transparent;
}

body.dark .owner-leave-member:hover {
    background: rgba(148, 112, 245, 0.14);
}

body.dark .owner-leave-member.selected {
    background: rgba(148, 112, 245, 0.14);
    border-color: #a78bfa;
}

body.dark .owner-leave-member-name {
    color: rgba(255, 255, 255, 0.92);
}

body.dark .owner-leave-member-radio {
    border-color: rgba(148, 112, 245, 0.3);
}

body.dark .owner-leave-member.selected .owner-leave-member-radio {
    border-color: #a78bfa;
    background: #a78bfa;
}

body.dark .toast {
    background: rgba(15, 10, 45, 0.98);
    color: rgba(255, 255, 255, 0.92);
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.3);
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (min-width: 768px) {
    .family-container {
        max-width: 540px;
        padding: 32px 24px 48px;
    }

    .family-card {
        border-radius: 22px;
        box-shadow: 0 4px 24px rgba(107, 120, 240, 0.12);
    }

    .family-card-header {
        padding: 20px 24px 14px;
    }

    .card-header-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .card-header-title {
        font-size: 1rem;
    }

    .children-grid {
        padding: 0 24px 20px;
    }

    .members-list {
        padding: 0 24px 20px;
    }

    .invite-form {
        padding: 0 24px 20px;
    }

    .pending-section {
        padding: 0 24px 20px;
    }

    .invite-card {
        padding: 44px 32px;
    }
}

@media (min-width: 1024px) {
    .family-container {
        max-width: 580px;
        padding: 40px 32px 56px;
    }

    .family-header {
        margin-bottom: 24px;
    }

}

@media (max-width: 380px) {
    .child-card {
        min-width: 100%;
    }

    .invite-input-group {
        flex-direction: column;
    }

    .invite-btn {
        width: 100%;
        text-align: center;
    }
}
