

:root {
    /* Core palette */
    --ph-bg-deep: #0c0e1a;
    --ph-bg-mid: #131629;
    --ph-bg-surface: rgba(255, 255, 255, 0.04);
    --ph-bg-glass: rgba(255, 255, 255, 0.06);
    --ph-border: rgba(255, 255, 255, 0.08);
    --ph-border-hover: rgba(255, 255, 255, 0.15);
    --ph-text: #f0f0f5;
    --ph-text-secondary: rgba(255, 255, 255, 0.6);
    --ph-text-muted: rgba(255, 255, 255, 0.35);
    --ph-danger: #ef4444;

    /* Spacing */
    --ph-gap: 12px;
    --ph-padding: 20px;
    --ph-radius: 16px;
    --ph-radius-lg: 24px;

    /* Motion */
    --ph-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ph-ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ph-duration: 0.35s;
}

/* ─── CONTAINER ─── */
.profile-home-container {
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--ph-bg-deep);
    font-family: 'DM Sans', sans-serif;
    color: var(--ph-text);
    position: relative;
    overflow-x: hidden;
}

/* ─── AMBIENT BACKGROUND ─── */
.profile-bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(34, 211, 238, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 80%, rgba(167, 139, 250, 0.05) 0%, transparent 60%),
        radial-gradient(ellipse 70% 40% at 50% 50%, rgba(245, 158, 11, 0.03) 0%, transparent 60%),
        linear-gradient(180deg, #0c0e1a 0%, #131629 40%, #0f1120 100%);
    z-index: 0;
    pointer-events: none;
}

.profile-bg-grain {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.015;
    z-index: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ─── CONTENT WRAPPER ─── */
.profile-home-content {
    position: relative;
    z-index: 1;
    max-width: 640px;
    margin: 0 auto;
    padding: var(--ph-padding);
    padding-top: max(24px, calc(env(safe-area-inset-top) + 16px));
    padding-bottom: calc(100px + env(safe-area-inset-bottom, 20px));
}

/* ─── HEADER ─── */
.profile-home-header {
    padding: 32px 0 40px;
    animation: phFadeDown 0.5s var(--ph-ease) both;
}

@keyframes phFadeDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-greeting-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-greeting {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ph-text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.profile-name {
    font-family: 'Syne', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.15;
    color: var(--ph-text);
}




.profile-role-badge {
    display: inline-flex;
    align-items: center;
    margin-top: 8px;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ph-text-secondary);
    border: 1px solid;
    border-radius: 50px;
    width: fit-content;
    background: var(--ph-bg-glass);
}

/* ─── NAVIGATION LIST ─── */
.profile-nav-list {
    display: flex;
    flex-direction: column;
    gap: var(--ph-gap);
}

/* ─── ACCORDION CARD ─── */
.profile-accordion {
    background: var(--ph-bg-glass);
    border: 1px solid var(--ph-border);
    border-radius: var(--ph-radius-lg);
    overflow: hidden;
    transition: border-color var(--ph-duration) var(--ph-ease),
                box-shadow var(--ph-duration) var(--ph-ease);
    animation: phSlideUp 0.4s var(--ph-ease) both;
}

@keyframes phSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-accordion.open {
    border-color: var(--ph-border-hover);
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.2),
                0 0 60px color-mix(in srgb, var(--accent) 8%, transparent);
}

/* Accordion Header */
.profile-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px var(--ph-padding);
    cursor: pointer;
    transition: background var(--ph-duration) var(--ph-ease);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.profile-accordion-header:active {
    background: rgba(255, 255, 255, 0.03);
}

.profile-accordion-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.profile-accordion-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid;
    flex-shrink: 0;
    transition: var(--ph-duration) var(--ph-ease);
}

.profile-accordion.open .profile-accordion-icon {
    transform: scale(1.05);
}

.profile-accordion-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-accordion-label {
    font-family: 'Syne', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ph-text);
    letter-spacing: -0.2px;
}

.profile-accordion-count {
    font-size: 0.78rem;
    color: var(--ph-text-muted);
    font-weight: 400;
}

.profile-accordion-chevron {
    transition: transform var(--ph-duration) var(--ph-ease);
    display: flex;
    align-items: center;
}

.profile-accordion-chevron.rotated {
    transform: rotate(180deg);
}

/* Accordion Content */
.profile-accordion-content {
    overflow: auto;
    max-height: 300px;
    transition: all 0.3s ease;
}

.profile-accordion-inner {
    padding: 0 8px 8px;
    
}

/* ─── SUB ITEMS ─── */
.profile-sub-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    margin: 2px 0;
    border-radius: var(--ph-radius);
    cursor: pointer;
    transition: background 0.2s var(--ph-ease);
    animation: phItemReveal 0.25s var(--ph-ease) both;
    -webkit-tap-highlight-color: transparent;
}

@keyframes phItemReveal {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.profile-sub-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.profile-sub-item:active {
    background: rgba(255, 255, 255, 0.08);
}

.profile-sub-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-sub-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-sub-label {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--ph-text);
}

.profile-sub-arrow {
    display: flex;
    align-items: center;
    opacity: 0.5;
    transition: opacity 0.2s, transform 0.2s var(--ph-ease);
}

.profile-sub-item:hover .profile-sub-arrow {
    opacity: 0.8;
    transform: translateX(2px);
}

/* ─── FILTER GROUP (nested expandable) ─── */
.profile-filter-group {
    border-radius: var(--ph-radius);
    overflow: hidden;
}

.profile-filter-header {
    position: relative;
}

.profile-filter-count {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--ph-text-muted);
    margin-left: 8px;
}

.profile-filter-chevron {
    display: flex;
    align-items: center;
    transition: transform var(--ph-duration) var(--ph-ease);
}

.profile-filter-chevron.expanded {
    transform: rotate(180deg);
}

.profile-filter-content {
    overflow-y: auto;
    
    transition: height var(--ph-duration) var(--ph-ease);
}

.profile-filter-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px 11px 56px;
    cursor: pointer;
    transition: background 0.2s var(--ph-ease);
    -webkit-tap-highlight-color: transparent;
}

.profile-filter-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.profile-filter-item:active {
    background: rgba(255, 255, 255, 0.08);
}

.profile-filter-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    opacity: 0.6;
}

.profile-filter-label {
    flex: 1;
    font-size: 0.88rem;
    color: var(--ph-text-secondary);
}

.profile-filter-item .profile-sub-arrow {
    opacity: 0.3;
}

/* ─── LOGOUT ─── */
.profile-logout-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--ph-border);
    animation: phSlideUp 0.4s var(--ph-ease) 0.4s both;
}

.profile-logout-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 16px var(--ph-padding);
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: var(--ph-radius-lg);
    cursor: pointer;
    transition: background 0.2s var(--ph-ease),
                border-color 0.2s var(--ph-ease),
                transform 0.1s;
    -webkit-tap-highlight-color: transparent;
}

.profile-logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.25);
}

.profile-logout-btn:active {
    transform: scale(0.98);
    background: rgba(239, 68, 68, 0.15);
}

.profile-logout-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 12px;
}

.profile-logout-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--ph-danger);
}

/* ─── RESPONSIVE ─── */
@media (min-width: 1025px) {
    .profile-home-content {
        max-width: 720px;
        padding-top: 80px;
        padding-bottom: 60px;
    }

    .profile-name {
        font-size: 2.8rem;
    }

    .profile-accordion-header:hover {
        background: rgba(255, 255, 255, 0.02);
    }
}


/* ── Responsive calendar visibility ── */

/* Mobile-only: show on mobile/iPad, hide on laptop+ */
.responsive-mobile-only {
  display: block;
}

/* Desktop-only: hide on mobile/iPad, show on laptop+ */
.responsive-desktop-only {
  display: none;
}

/* Breakpoint: 1024px (iPad landscape and below = mobile, above = desktop) */
@media (min-width: 1024px) {
  .responsive-mobile-only {
    display: none;
  }
  .responsive-desktop-only {
    display: block;
  }
}
@media (max-width: 380px) {
    .profile-name {
        font-size: 1.8rem;
    }

    .profile-accordion-header {
        padding: 14px 16px;
    }

    .profile-accordion-icon {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .profile-sub-item {
        padding: 12px 12px;
    }
}

/* ─── SAFE AREAS ─── */
@supports (padding: max(0px)) {
    .profile-home-content {
        padding-top: max(24px, calc(env(safe-area-inset-top) + 16px));
    }
}

/* ─── SCROLLBAR ─── */
.profile-home-container::-webkit-scrollbar {
    width: 0;
    display: none;
}