/* ============================================
   KADOHR - COMPONENTS STYLESHEET
   Buttons, Cards, Forms, Badges, Loaders
   ============================================ */

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--kd-space-2);
    padding: 12px 24px;
    border-radius: var(--kd-radius-lg);
    font-family: var(--kd-font-body);
    font-size: var(--kd-text-base);
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: all var(--kd-transition-fast);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn:active { transform: scale(0.96); }

.btn-primary {
    background: var(--kd-primary-gradient);
    color: var(--kd-text-inverse);
    box-shadow: 0 4px 16px rgba(255, 75, 110, 0.35);
}

.btn-primary:hover {
    box-shadow: 0 6px 24px rgba(255, 75, 110, 0.45);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--kd-surface);
    color: var(--kd-text);
    border: 1.5px solid var(--kd-border);
    box-shadow: var(--kd-shadow-sm);
}

.btn-secondary:hover {
    border-color: var(--kd-primary-light);
    color: var(--kd-primary);
    box-shadow: var(--kd-shadow-md);
}

.btn-ghost {
    background: transparent;
    color: var(--kd-text-secondary);
}

.btn-ghost:hover { color: var(--kd-text); background: var(--kd-border-light); }

.btn-google {
    background: var(--kd-surface);
    color: var(--kd-text);
    border: 1.5px solid var(--kd-border);
    box-shadow: var(--kd-shadow-sm);
    gap: var(--kd-space-3);
    padding: 14px 24px;
    border-radius: 14px;
    font-weight: 600;
}

.btn-google:hover {
    border-color: var(--kd-primary-light);
    box-shadow: var(--kd-shadow-md);
    transform: translateY(-1px);
}

.btn-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--kd-radius-full);
    padding: 0;
    font-size: 1.5rem;
    box-shadow: var(--kd-shadow-md);
}

.btn-like {
    background: linear-gradient(135deg, #10B981, #34D399);
    color: white;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
}

.btn-nope {
    background: linear-gradient(135deg, #EF4444, #F87171);
    color: white;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35);
}

.btn-superlike {
    background: linear-gradient(135deg, #3B82F6, #60A5FA);
    color: white;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
}

.btn-undo {
    background: var(--kd-surface);
    color: var(--kd-text-secondary);
    border: 1.5px solid var(--kd-border);
    box-shadow: var(--kd-shadow-sm);
}

.btn-sm {
    padding: 8px 16px;
    font-size: var(--kd-text-sm);
    border-radius: var(--kd-radius-md);
}

.btn-lg {
    padding: 16px 32px;
    font-size: var(--kd-text-lg);
    border-radius: var(--kd-radius-xl);
}

/* ---------- CARDS ---------- */
.card {
    background: var(--kd-surface);
    border-radius: var(--kd-radius-xl);
    box-shadow: var(--kd-shadow-md);
    overflow: hidden;
    transition: transform var(--kd-transition-base), box-shadow var(--kd-transition-base);
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--kd-shadow-lg);
}

/* Profile Card (Swipe) */
.profile-card {
    position: absolute;
    inset: 0;
    background: var(--kd-surface);
    border-radius: var(--kd-radius-xl);
    overflow: hidden;
    box-shadow: var(--kd-shadow-lg);
    will-change: transform;
    touch-action: none;
    user-select: none;
}

.profile-card__image {
    width: 100%;
    height: 70%;
    object-fit: cover;
    pointer-events: none;
}

.profile-card__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--kd-space-5);
    padding-top: 60px;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
    color: white;
}

.profile-card__name {
    font-family: var(--kd-font-heading);
    font-size: var(--kd-text-2xl);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--kd-space-2);
}

.profile-card__age {
    font-size: var(--kd-text-xl);
    font-weight: 400;
    opacity: 0.9;
}

.profile-card__info {
    display: flex;
    align-items: center;
    gap: var(--kd-space-2);
    font-size: var(--kd-text-sm);
    opacity: 0.85;
    margin-top: var(--kd-space-1);
}

.profile-card__bio {
    font-size: var(--kd-text-sm);
    line-height: 1.5;
    opacity: 0.8;
    margin-top: var(--kd-space-2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.profile-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--kd-space-1);
    margin-top: var(--kd-space-3);
}

.profile-card__tag {
    padding: 4px 10px;
    background: rgba(255,255,255,0.15);
    border-radius: var(--kd-radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    backdrop-filter: blur(8px);
}

/* Swipe overlay badges */
.swipe-badge {
    position: absolute;
    top: 40px;
    padding: 8px 20px;
    border: 4px solid;
    border-radius: 12px;
    font-size: 1.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    transform: rotate(-12deg);
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 10;
    pointer-events: none;
}

.swipe-badge.like {
    left: 30px;
    color: #10B981;
    border-color: #10B981;
    transform: rotate(-12deg);
}

.swipe-badge.nope {
    right: 30px;
    color: #EF4444;
    border-color: #EF4444;
    transform: rotate(12deg);
}

.swipe-badge.superlike {
    top: auto;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%) rotate(0deg);
    color: #3B82F6;
    border-color: #3B82F6;
    font-size: 1.25rem;
}

/* Feature Card */
.feature-card {
    padding: var(--kd-space-6);
    text-align: center;
    border-radius: var(--kd-radius-xl);
    background: var(--kd-surface);
    border: 1px solid var(--kd-border-light);
    transition: all var(--kd-transition-base);
}

.feature-card:hover {
    border-color: var(--kd-primary-light);
    box-shadow: var(--kd-shadow-md);
    transform: translateY(-4px);
}

.feature-card__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--kd-space-4);
    background: var(--kd-primary-gradient);
    border-radius: var(--kd-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: var(--kd-shadow-glow);
}

.feature-card__title {
    font-family: var(--kd-font-heading);
    font-size: var(--kd-text-lg);
    font-weight: 700;
    margin-bottom: var(--kd-space-2);
}

.feature-card__desc {
    font-size: var(--kd-text-sm);
    color: var(--kd-text-secondary);
    line-height: 1.6;
}

/* Match Card */
.match-card {
    display: flex;
    align-items: center;
    gap: var(--kd-space-4);
    padding: var(--kd-space-4);
    background: var(--kd-surface);
    border-radius: var(--kd-radius-lg);
    border: 1px solid var(--kd-border-light);
    transition: all var(--kd-transition-fast);
    cursor: pointer;
}

.match-card:hover {
    border-color: var(--kd-primary-light);
    box-shadow: var(--kd-shadow-sm);
}

.match-card__avatar {
    width: 56px;
    height: 56px;
    border-radius: var(--kd-radius-full);
    object-fit: cover;
    border: 2px solid var(--kd-border-light);
}

.match-card__info { flex: 1; min-width: 0; }

.match-card__name {
    font-weight: 600;
    font-size: var(--kd-text-base);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-card__preview {
    font-size: var(--kd-text-sm);
    color: var(--kd-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-card__time {
    font-size: var(--kd-text-xs);
    color: var(--kd-text-muted);
    white-space: nowrap;
}

/* ---------- FORMS ---------- */
.form-group { margin-bottom: var(--kd-space-4); }

.form-label {
    display: block;
    font-size: var(--kd-text-sm);
    font-weight: 600;
    color: var(--kd-text);
    margin-bottom: var(--kd-space-2);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--kd-border);
    border-radius: var(--kd-radius-md);
    font-size: var(--kd-text-base);
    background: var(--kd-surface);
    transition: all var(--kd-transition-fast);
    color: var(--kd-text);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--kd-primary);
    box-shadow: 0 0 0 3px rgba(255, 75, 110, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-hint {
    font-size: var(--kd-text-xs);
    color: var(--kd-text-muted);
    margin-top: var(--kd-space-1);
}

/* Toggle Switch */
.toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--kd-space-3);
    cursor: pointer;
}

.toggle__input { display: none; }

.toggle__slider {
    width: 48px;
    height: 26px;
    background: var(--kd-border);
    border-radius: var(--kd-radius-full);
    position: relative;
    transition: background var(--kd-transition-fast);
}

.toggle__slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: var(--kd-radius-full);
    transition: transform var(--kd-transition-fast);
    box-shadow: var(--kd-shadow-xs);
}

.toggle__input:checked + .toggle__slider {
    background: var(--kd-primary);
}

.toggle__input:checked + .toggle__slider::after {
    transform: translateX(22px);
}

/* ---------- BADGES ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--kd-radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-primary { background: rgba(255, 75, 110, 0.1); color: var(--kd-primary); }
.badge-success { background: rgba(16, 185, 129, 0.1); color: var(--kd-success); }
.badge-verified {
    background: rgba(59, 130, 246, 0.1);
    color: var(--kd-info);
    gap: 2px;
}

/* ---------- EMPTY STATES ---------- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--kd-space-10) var(--kd-space-4);
    gap: var(--kd-space-4);
    animation: fade-in-up var(--kd-transition-slow);
}

.empty-state__icon {
    font-size: 4rem;
    opacity: 0.5;
    margin-bottom: var(--kd-space-2);
}

.empty-state__title {
    font-family: var(--kd-font-heading);
    font-size: var(--kd-text-xl);
    font-weight: 700;
    color: var(--kd-text);
}

.empty-state__desc {
    font-size: var(--kd-text-base);
    color: var(--kd-text-secondary);
    max-width: 320px;
}

/* ---------- SECTION UTILITIES ---------- */
.section { padding: var(--kd-space-12) var(--kd-space-4); }
.section-title {
    font-family: var(--kd-font-heading);
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: var(--kd-space-2);
}
.section-subtitle {
    text-align: center;
    color: var(--kd-text-secondary);
    font-size: var(--kd-text-lg);
    margin-bottom: var(--kd-space-10);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ---------- SWIPE CONTAINER ---------- */
.swipe-container {
    position: relative;
    width: 100%;
    max-width: var(--kd-card-max-width);
    height: 580px;
    margin: 0 auto;
    perspective: 1000px;
}

.swipe-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--kd-space-4);
    margin-top: var(--kd-space-6);
    padding-bottom: var(--kd-space-4);
}

/* ---------- FILTER BAR ---------- */
.filter-bar {
    display: flex;
    align-items: center;
    gap: var(--kd-space-3);
    padding: var(--kd-space-3) var(--kd-space-4);
    background: var(--kd-surface);
    border-radius: var(--kd-radius-lg);
    box-shadow: var(--kd-shadow-sm);
    margin-bottom: var(--kd-space-4);
    overflow-x: auto;
    scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar { display: none; }

.filter-chip {
    padding: 8px 16px;
    border-radius: var(--kd-radius-full);
    font-size: var(--kd-text-sm);
    font-weight: 500;
    background: var(--kd-border-light);
    color: var(--kd-text-secondary);
    border: 1.5px solid transparent;
    white-space: nowrap;
    cursor: pointer;
    transition: all var(--kd-transition-fast);
}

.filter-chip:hover { background: var(--kd-border); }
.filter-chip.active {
    background: rgba(255, 75, 110, 0.1);
    color: var(--kd-primary);
    border-color: var(--kd-primary-light);
}

/* ---------- AUTH CARD (used by auth.js) ---------- */
.auth-card {
    background: var(--kd-surface);
    border-radius: 24px;
    padding: 48px 36px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: var(--kd-shadow-xl);
    animation: fade-in-up 0.5s ease;
}

.auth-card__logo {
    width: 72px;
    height: 72px;
    background: var(--kd-primary-gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 32px;
    font-weight: 800;
    color: white;
    font-family: var(--kd-font-heading);
    box-shadow: var(--kd-shadow-glow);
}

.auth-card__title {
    font-family: var(--kd-font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--kd-text);
    margin-bottom: 8px;
}

.auth-card__desc {
    color: var(--kd-text-secondary);
    font-size: 0.95rem;
    margin-bottom: 32px;
    line-height: 1.6;
}

/* ---------- PAGE-SPECIFIC: HOME ---------- */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--kd-space-8) var(--kd-space-4);
    position: relative;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(255, 75, 110, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(107, 92, 231, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(255, 142, 83, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.hero__content {
    position: relative;
    z-index: 1;
    max-width: 680px;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: var(--kd-space-2);
    padding: 8px 16px;
    background: rgba(255, 75, 110, 0.08);
    border: 1px solid rgba(255, 75, 110, 0.15);
    border-radius: var(--kd-radius-full);
    font-size: var(--kd-text-sm);
    font-weight: 600;
    color: var(--kd-primary);
    margin-bottom: var(--kd-space-6);
}

.hero__title {
    font-family: var(--kd-font-heading);
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--kd-space-5);
    letter-spacing: -0.02em;
}

.hero__subtitle {
    font-size: clamp(1rem, 3vw, 1.25rem);
    color: var(--kd-text-secondary);
    line-height: 1.7;
    margin-bottom: var(--kd-space-8);
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.hero__cta {
    display: flex;
    flex-direction: column;
    gap: var(--kd-space-3);
    align-items: center;
}

@media (min-width: 640px) {
    .hero__cta { flex-direction: row; justify-content: center; }
}

.hero__mock-hint {
    margin-top: var(--kd-space-4);
    font-size: var(--kd-text-sm);
    color: var(--kd-text-muted);
}

.hero__mock-hint a {
    color: var(--kd-primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Floating elements animation */
.float-orb {
    position: absolute;
    border-radius: var(--kd-radius-full);
    filter: blur(60px);
    opacity: 0.4;
    animation: float-orb 8s ease-in-out infinite;
    pointer-events: none;
}

.float-orb--1 {
    width: 300px; height: 300px;
    background: rgba(255, 75, 110, 0.15);
    top: 10%; right: -5%;
    animation-delay: 0s;
}

.float-orb--2 {
    width: 250px; height: 250px;
    background: rgba(107, 92, 231, 0.12);
    bottom: 15%; left: -5%;
    animation-delay: -3s;
}

.float-orb--3 {
    width: 180px; height: 180px;
    background: rgba(255, 142, 83, 0.1);
    top: 50%; left: 50%;
    animation-delay: -6s;
}

@keyframes float-orb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -30px) scale(1.05); }
    66% { transform: translate(-15px, 15px) scale(0.95); }
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--kd-space-5);
    max-width: 1000px;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .features-grid { grid-template-columns: repeat(3, 1fr); }
}

/* How It Works */
.steps {
    display: flex;
    flex-direction: column;
    gap: var(--kd-space-8);
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.steps::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--kd-primary), var(--kd-secondary));
    opacity: 0.2;
}

.step {
    display: flex;
    gap: var(--kd-space-5);
    align-items: flex-start;
    position: relative;
}

.step__number {
    width: 50px;
    height: 50px;
    border-radius: var(--kd-radius-full);
    background: var(--kd-primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--kd-font-heading);
    font-size: var(--kd-text-xl);
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: var(--kd-shadow-glow);
    position: relative;
    z-index: 1;
}

.step__content h3 {
    font-family: var(--kd-font-heading);
    font-size: var(--kd-text-lg);
    font-weight: 700;
    margin-bottom: var(--kd-space-1);
}

.step__content p {
    color: var(--kd-text-secondary);
    font-size: var(--kd-text-base);
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, rgba(255,75,110,0.05) 0%, rgba(107,92,231,0.05) 100%);
    border-radius: var(--kd-radius-xl);
    padding: var(--kd-space-10) var(--kd-space-6);
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    border: 1px solid rgba(255,75,110,0.08);
}

/* Footer */
.site-footer {
    text-align: center;
    padding: var(--kd-space-8) var(--kd-space-4);
    color: var(--kd-text-muted);
    font-size: var(--kd-text-sm);
    border-top: 1px solid var(--kd-border-light);
}

/* ---------- PAGE-SPECIFIC: DASHBOARD ---------- */
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--kd-space-4);
}

.dashboard-header h1 {
    font-family: var(--kd-font-heading);
    font-size: var(--kd-text-2xl);
    font-weight: 700;
}

/* Card stack */
.card-stack {
    position: relative;
    width: 100%;
    max-width: var(--kd-card-max-width);
    height: 520px;
    margin: 0 auto;
}

.card-stack__placeholder {
    position: absolute;
    inset: 0;
    background: var(--kd-surface);
    border-radius: var(--kd-radius-xl);
    border: 2px dashed var(--kd-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--kd-space-3);
    color: var(--kd-text-muted);
}

.card-stack__placeholder .icon {
    font-size: 3rem;
    opacity: 0.5;
}

/* Profile detail modal content */
.profile-detail__photos {
    display: flex;
    gap: var(--kd-space-2);
    overflow-x: auto;
    padding-bottom: var(--kd-space-2);
    scrollbar-width: none;
}

.profile-detail__photos::-webkit-scrollbar { display: none; }

.profile-detail__photos img {
    width: 120px;
    height: 160px;
    object-fit: cover;
    border-radius: var(--kd-radius-md);
    flex-shrink: 0;
}

.profile-detail__section {
    margin-top: var(--kd-space-4);
}

.profile-detail__section h4 {
    font-size: var(--kd-text-sm);
    font-weight: 700;
    color: var(--kd-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--kd-space-2);
}

.profile-detail__section p {
    color: var(--kd-text);
    line-height: 1.6;
}

.profile-detail__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--kd-space-2);
}

.profile-detail__tags .badge {
    padding: 6px 14px;
    font-size: var(--kd-text-sm);
}

/* ---------- PAGE-SPECIFIC: MESSAGES ---------- */
.chat-header {
    display: flex;
    align-items: center;
    gap: var(--kd-space-3);
    padding: var(--kd-space-3) 0;
    border-bottom: 1px solid var(--kd-border-light);
    margin-bottom: var(--kd-space-4);
}

.chat-header__avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--kd-radius-full);
    object-fit: cover;
}

.chat-header__info h3 {
    font-size: var(--kd-text-base);
    font-weight: 600;
}

.chat-header__info span {
    font-size: var(--kd-text-xs);
    color: var(--kd-success);
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: var(--kd-space-3);
    padding: var(--kd-space-4) 0;
    overflow-y: auto;
    flex: 1;
}

.chat-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: var(--kd-text-sm);
    line-height: 1.5;
    animation: fade-in-up 0.2s ease;
}

.chat-bubble--sent {
    align-self: flex-end;
    background: var(--kd-primary-gradient);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-bubble--received {
    align-self: flex-start;
    background: var(--kd-border-light);
    color: var(--kd-text);
    border-bottom-left-radius: 4px;
}

.chat-input-area {
    display: flex;
    gap: var(--kd-space-2);
    padding: var(--kd-space-3) 0;
    border-top: 1px solid var(--kd-border-light);
}

.chat-input-area .form-input {
    flex: 1;
    border-radius: var(--kd-radius-full);
    padding: 12px 20px;
}

/* ---------- PAGE-SPECIFIC: SETTINGS ---------- */
.settings-section {
    max-width: 600px;
    margin: 0 auto;
}

.settings-group {
    background: var(--kd-surface);
    border-radius: var(--kd-radius-xl);
    padding: var(--kd-space-5);
    margin-bottom: var(--kd-space-4);
    box-shadow: var(--kd-shadow-sm);
}

.settings-group__title {
    font-family: var(--kd-font-heading);
    font-size: var(--kd-text-lg);
    font-weight: 700;
    margin-bottom: var(--kd-space-4);
    display: flex;
    align-items: center;
    gap: var(--kd-space-2);
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--kd-space-3) 0;
    border-bottom: 1px solid var(--kd-border-light);
}

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

.settings-item__label {
    font-weight: 500;
    font-size: var(--kd-text-base);
}

.settings-item__desc {
    font-size: var(--kd-text-xs);
    color: var(--kd-text-muted);
    margin-top: 2px;
}

/* Danger zone */
.danger-zone {
    border: 1.5px solid rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.02);
}

.danger-zone .settings-group__title { color: var(--kd-error); }

/* ---------- PROFILE PAGE ---------- */
.profile-header {
    text-align: center;
    padding: var(--kd-space-6) 0;
}

.profile-header__avatar {
    width: 120px;
    height: 120px;
    border-radius: var(--kd-radius-full);
    object-fit: cover;
    border: 4px solid white;
    box-shadow: var(--kd-shadow-md);
    margin: 0 auto var(--kd-space-3);
}

.profile-header__name {
    font-family: var(--kd-font-heading);
    font-size: var(--kd-text-2xl);
    font-weight: 700;
}

.profile-header__meta {
    color: var(--kd-text-secondary);
    font-size: var(--kd-text-sm);
    margin-top: var(--kd-space-1);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--kd-space-4);
    max-width: 400px;
    margin: var(--kd-space-6) auto;
}

.profile-stat {
    text-align: center;
    padding: var(--kd-space-3);
    background: var(--kd-surface);
    border-radius: var(--kd-radius-lg);
    box-shadow: var(--kd-shadow-sm);
}

.profile-stat__value {
    font-family: var(--kd-font-heading);
    font-size: var(--kd-text-xl);
    font-weight: 700;
    color: var(--kd-primary);
}

.profile-stat__label {
    font-size: var(--kd-text-xs);
    color: var(--kd-text-secondary);
    margin-top: 2px;
}

.profile-form {
    max-width: 600px;
    margin: 0 auto;
}

/* Photo grid for profile editing */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--kd-space-3);
    margin-bottom: var(--kd-space-4);
}

.photo-grid__item {
    aspect-ratio: 3/4;
    border-radius: var(--kd-radius-md);
    background: var(--kd-border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--kd-text-muted);
    cursor: pointer;
    transition: all var(--kd-transition-fast);
    border: 2px dashed var(--kd-border);
    overflow: hidden;
    position: relative;
}

.photo-grid__item:hover {
    border-color: var(--kd-primary);
    color: var(--kd-primary);
}

.photo-grid__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-grid__item--add {
    background: transparent;
}

.photo-grid__item--main {
    grid-column: span 2;
    grid-row: span 2;
}

.photo-grid__remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(0,0,0,0.5);
    color: white;
    border-radius: var(--kd-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--kd-transition-fast);
}

.photo-grid__item:hover .photo-grid__remove { opacity: 1; }