/* ============================================================
   Zenfit Members – Dark UI
   Variables → Base → Auth → App layout → Components → Utility
   ============================================================ */

/* ── CSS Variables ──────────────────────────────────────────── */
:root {
    --zm-bg:           #0d0d0d;
    --zm-bg-card:      #1a1a1a;
    --zm-bg-input:     #111111;
    --zm-bg-sidebar:   #141414;
    --zm-green:        #22c55e;
    --zm-green-dark:   #16a34a;
    --zm-green-soft:   rgba(34,197,94,0.12);
    --zm-red:          #ef4444;
    --zm-text:         #ffffff;
    --zm-text-muted:   #9ca3af;
    --zm-text-faint:   #4b5563;
    --zm-border:       #262626;
    --zm-border-focus: #22c55e;
    --zm-sidebar-w:    320px;
    --zm-radius:       12px;
    --zm-radius-sm:    8px;
    --zm-transition:   0.2s ease;
}

/* ── Reset / Base ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.zm-body {
    background: var(--zm-bg);
    color: var(--zm-text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
}

body.zm-body a {/* color: inherit; */text-decoration: none;}
body.zm-body img { max-width: 100%; display: block; }
body.zm-body * { -webkit-font-smoothing: antialiased; }

/* Hide WP admin bar offset on member pages */
body.zm-body #wpadminbar { display: none !important; }
html { margin-top: 0 !important; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   AUTH PAGES (Login / Register)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.zm-auth-bg {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: var(--zm-bg);
    /* Optional: background image with overlay */
    background-image:
        linear-gradient(rgba(0,0,0,0.72), rgba(0,0,0,0.72)),
        url('https://images.unsplash.com/photo-1534438327276-14e5300c3a48?w=1600&q=80');
    background-size: cover;
    background-position: center;
}

.zm-auth-center { width: 100%; display: flex; justify-content: center; }

.zm-auth-card {
    background: rgba(20,20,20,0.96);
    border: 1px solid var(--zm-border);
    border-radius: var(--zm-radius);
    padding: 40px 36px;
    width: 100%;
    max-width: 520px;
    backdrop-filter: blur(8px);
}

.zm-auth-card--wide { max-width: 700px; }

.zm-auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.zm-logo-img { max-width: 100px; border-radius: 12px; }

.zm-logo-text {
    font-size: 22px;
    font-weight: 700;
    color: var(--zm-green);
    letter-spacing: 1px;
}

.zm-auth-title {
    font-size: 26px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 6px;
    color: #fff;
}

.zm-auth-subtitle {
    text-align: center;
    color: var(--zm-text-muted);
    font-size: 14px;
    margin-bottom: 28px;
}

/* Form layout helpers */
.zm-auth-form  { display: flex; flex-direction: column; gap: 16px; }
.zm-form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.zm-span-full  { grid-column: 1 / -1; }

.zm-input-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Input group */
.zm-input-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--zm-text-muted);
}

.zm-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--zm-bg-input);
    border: 1.5px solid var(--zm-border);
    border-radius: var(--zm-radius-sm);
    transition: border-color var(--zm-transition);
}

.zm-input-wrap:focus-within {
    border-color: var(--zm-border-focus);
    background: #161616;
}

/* Icon as a flex child – no absolute positioning, immune to theme padding resets */
.zm-input-icon {
    padding: 0 10px 0 14px;
    color: var(--zm-text-faint);
    font-size: 14px;
    pointer-events: none;
    flex-shrink: 0;
    line-height: 1;
}

.zm-input-wrap input {
    flex: 1;
    min-width: 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--zm-text);
    padding: 12px 12px 12px 0;
    font-size: 15px;
    outline: none !important;
    margin-bottom: 0;
    height: 55px !important;
}

/* Inputs without icon (profile form) */
.zm-profile-form .zm-input-wrap input {
    padding-left: 14px;
}

.zm-input-wrap input:focus { outline: none; }

.zm-input-wrap input::placeholder { color: var(--zm-text-faint); }

/* Read-only phone display */
.zm-input-wrap--readonly {
    background: var(--zm-bg-card);
    border-color: transparent;
    cursor: default;
}

.zm-input-static {
    flex: 1;
    padding: 12px 14px;
    font-size: 15px;
    color: #ffff;
    font-variant-numeric: tabular-nums;
    border: 1px solid #2A2A2A;
    border-radius: 12px;
}

/* Password toggle button */
.zm-toggle-pw {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--zm-text-faint);
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
}

.zm-toggle-pw:hover { color: var(--zm-text-muted); }

/* Checkbox */
.zm-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--zm-text-muted);
    cursor: pointer;
}

.zm-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    accent-color: var(--zm-green);
    margin-top: 2px;
    cursor: pointer;
}

/* Auth footer link */
.zm-auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--zm-text-muted);
    padding-top: 20px;
    border-top: 1px solid var(--zm-border);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   BUTTONS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.zm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: var(--zm-radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--zm-transition);
    letter-spacing: 0.5px;
}

.zm-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.zm-btn-primary {
    background: var(--zm-green);
    color: #fff;
}

.zm-btn-primary:hover:not(:disabled) {
    background: var(--zm-green-dark);
    transform: translateY(-1px);
}

.zm-btn-outline {
    background: transparent;
    color: var(--zm-green);
    border: 1.5px solid var(--zm-green);
}

.zm-btn-outline:hover { background: var(--zm-green-soft); }

.zm-btn-full { width: 100%; }

.zm-link { color: var(--zm-green); font-weight: 500; }
.zm-link:hover { text-decoration: underline; }

.zm-link-small { font-size: 13px; color: var(--zm-green); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ALERT
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.zm-alert {
    padding: 12px 16px;
    border-radius: var(--zm-radius-sm);
    font-size: 14px;
    margin-bottom: 16px;
}

.zm-alert--success { background: rgba(34,197,94,0.15); border: 1px solid var(--zm-green); color: var(--zm-green); }
.zm-alert--error   { background: rgba(239,68,68,0.12);  border: 1px solid #ef4444; color: #f87171; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   APP LAYOUT (Sidebar + Main)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.zm-app {
    display: flex;
    align-items: flex-start;
    min-height: 100vh;
    background: var(--zm-bg);
    max-width: 1440px;
    margin: 0 auto;
    padding: 32px 32px 64px;
    gap: 24px;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.zm-sidebar {
    width: var(--zm-sidebar-w);
    min-width: var(--zm-sidebar-w);
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
    position: sticky;
    top: 32px;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    z-index: 100;
    transition: transform var(--zm-transition);
    flex-shrink: 0;
}

/* ── Profile Card ─────────────────────────────────────────── */
.zm-sidebar-profile-card {
    background: var(--zm-bg-card);
    border: 1px solid var(--zm-border);
    border-radius: var(--zm-radius);
    padding: 32px 20px 28px;
    text-align: center;
    flex-shrink: 0;
}

.zm-sidebar-avatar-wrap {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 18px;
}

.zm-sidebar-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #222;
    /* ring with gap: inner dark gap + outer green ring */
    box-shadow: 0 0 0 4px var(--zm-bg-card), 0 0 0 7px var(--zm-green);
}

.zm-sidebar-avatar img { width: 100%; height: 100%; object-fit: cover; }

.zm-sidebar-avatar-placeholder {
    font-size: 48px;
    color: var(--zm-text-faint);
}

.zm-sidebar-avatar-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--zm-green);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    border: 2px solid var(--zm-bg-card);
    pointer-events: none;
}

.zm-sidebar-name {
    font-size: 15px;
    color: var(--zm-text-muted);
    font-weight: 500;
}

.zm-sidebar-name strong {
    display: inline;
    font-size: 17px;
    color: var(--zm-text);
    font-weight: 700;
}

/* ── Nav Card ─────────────────────────────────────────────── */
.zm-sidebar-nav-card {
    background: var(--zm-bg-card);
    border: 1px solid var(--zm-border);
    border-radius: var(--zm-radius);
    overflow: hidden;
    flex-shrink: 0;
}

/* ── Sidebar Nav ─────────────────────────────────────────── */
.zm-sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 0;
}

.zm-sidebar-nav__item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    color: var(--zm-text-muted);
    font-size: 15px;
    font-weight: 500;
    transition: color var(--zm-transition), background var(--zm-transition);
    border-bottom: 1px solid var(--zm-border);
    position: relative;
    background: transparent;
    font-weight: 700;
    font-size: 16px;
    line-height: 100%;
    color: #94A3B8;
    position: relative;
    /* padding: 14px 0; */
    /* padding-left: 25px; */
}

.zm-sidebar-nav__item:last-child { border-bottom: none; }

.zm-sidebar-nav__item:hover {
    background: rgba(255,255,255,0.03);
    color: var(--zm-text);
}

.zm-sidebar-nav__item.zm-active {
    color: var(--zm-green);
    background: transparent;
}

.zm-sidebar-nav__item i:first-child {
    width: 20px;
    text-align: center;
    font-size: 17px;
    flex-shrink: 0;
}

.zm-nav-arrow {
    margin-left: auto;
    font-size: 12px;
    flex-shrink: 0;
}

/* ── Sidebar Footer (logout) ─────────────────────────────── */
.zm-sidebar-footer {
    border-top: 1px solid var(--zm-border);
}

.zm-sidebar-logout {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    color: var(--zm-red);
    font-size: 15px;
    font-weight: 500;
    transition: background var(--zm-transition);
    width: 100%;
}

.zm-sidebar-logout:hover { background: rgba(239,68,68,0.08); }
.zm-sidebar-logout i { width: 20px; text-align: center; font-size: 17px; }

/* ── Main content ────────────────────────────────────────── */
.zm-main {
    flex: 1;
    min-width: 0;
}

.zm-main-inner {
    padding: 0;
}

/* Mobile header */
.zm-mobile-header {
    display: none;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: var(--zm-bg-sidebar);
    border-bottom: 1px solid var(--zm-border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.zm-menu-toggle {
    background: none;
    border: none;
    color: var(--zm-text);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
}

.zm-mobile-title { font-weight: 600; font-size: 16px; }

.zm-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PAGE HEADER
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.zm-page-header { margin-bottom: 32px; }

.zm-breadcrumb {
    font-size: 12px;
    color: var(--zm-green);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 8px;
}

.zm-breadcrumb a { color: var(--zm-green); }
.zm-breadcrumb a:hover { text-decoration: underline; }

.zm-page-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
    font-weight: 800;
    font-size: 48px;
    line-height: 48px;
    text-transform: uppercase;
    color: #FFFFFF;
}

.zm-page-desc { color: var(--zm-text-muted); font-size: 14px; }

/* ── Tabs ────────────────────────────────────────────────── */
.zm-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.zm-tab {
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--zm-text-muted);
    transition: all var(--zm-transition);
    border: 1px solid transparent;
}

.zm-tab:hover { color: var(--zm-text); background: rgba(255,255,255,0.06); }

.zm-tab--active {
    color: var(--zm-green);
    border-color: var(--zm-green);
    background: var(--zm-green-soft);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   VIDEO LIBRARY
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.zm-video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.zm-video-card {
    background: var(--zm-bg-card);
    border-radius: var(--zm-radius);
    overflow: hidden;
    border: 1px solid var(--zm-border);
    cursor: pointer;
    transition: transform var(--zm-transition), border-color var(--zm-transition);
}

.zm-video-card:hover { transform: translateY(-3px); border-color: #333; }

.zm-video-thumb {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #111;
}

.zm-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.zm-video-card:hover .zm-video-thumb img { transform: scale(1.04); }

.zm-video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--zm-text-faint);
}

.zm-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #1B9246;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--zm-transition), background var(--zm-transition);
    box-shadow: 0 4px 20px rgba(34,197,94,0.4);
}

.zm-play-btn i { margin-left: 3px; }

.zm-video-card:hover .zm-play-btn {
    transform: translate(-50%, -50%) scale(1.1);
    background: var(--zm-green-dark);
}

.zm-video-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-top: 1px solid var(--zm-border);
}

.zm-video-label { font-size: 14px; font-weight: 500; }

.zm-video-arrow {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--zm-green-soft);
    color: var(--zm-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   FILE LIBRARY
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.zm-file-card {
    background: var(--zm-bg-card);
    border-radius: var(--zm-radius);
    border: 1px solid var(--zm-border);
    overflow: hidden;
}

.zm-file-list-title {
    font-size: 16px;
    font-weight: 600;
    padding: 18px 24px;
    border-bottom: 1px solid var(--zm-border);
    color: #fff;
}

.zm-file-table {
    width: 100%;
    border-collapse: collapse;
}

.zm-file-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--zm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--zm-border);
}

.zm-file-table tbody tr {
    transition: background var(--zm-transition);
}

.zm-file-table tbody td {
    border-bottom: 1px solid rgba(255,255,255,0.06);
    line-height: 33px;
}

.zm-file-table tbody tr:last-child td { border-bottom: none; }
.zm-file-table tbody tr:hover { background: rgba(255,255,255,0.03); }

.zm-file-table td {padding: 16px;vertical-align: middle;line-height: 27px;}

.zm-file-num { color: var(--zm-text-muted); font-size: 13px; }

.zm-file-name {
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 20px;
    padding: 19px 0 !important;
}

.zm-file-type-icon { font-size: 18px; color: var(--zm-green); flex-shrink: 0; }

.zm-file-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(255,255,255,0.08);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.zm-file-size { color: var(--zm-text-muted); font-size: 13px; }

.zm-dl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--zm-green-soft);
    color: var(--zm-green);
    font-size: 14px;
    transition: all var(--zm-transition);
}

.zm-dl-btn:hover { background: var(--zm-green); color: #fff; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PHOTO LIBRARY – Album Grid
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.zm-album-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.zm-album-card {
    background: var(--zm-bg-card);
    border: 1px solid var(--zm-border);
    border-radius: var(--zm-radius);
    overflow: hidden;
    transition: transform var(--zm-transition);
}

.zm-album-card:hover { transform: translateY(-3px); }

.zm-album-card__img-wrap {
    display: block;
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #111;
}

.zm-album-card__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.zm-album-card:hover .zm-album-card__img-wrap img { transform: scale(1.05); }

.zm-album-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: var(--zm-text-faint);
}

.zm-album-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--zm-green);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

.zm-album-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
}

.zm-album-card__title {
    font-size: 14px;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
    color: var(--zm-green);
    transition: color var(--zm-transition);
}

.zm-album-card__title:hover { color: #4ade80; }

.zm-album-count {
    font-size: 12px;
    color: var(--zm-text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.zm-album-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--zm-green-soft);
    color: var(--zm-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    transition: all var(--zm-transition);
}

.zm-album-arrow:hover { background: var(--zm-green); color: #fff; }

.zm-album-meta-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--zm-text-muted);
    margin-top: 6px;
}

/* ── Gallery Grid (album detail) ─────────────────────────── */
.zm-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 32px;
}

.zm-gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--zm-radius-sm);
    cursor: pointer;
    background: #111;
}

.zm-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.zm-gallery-item:hover img { transform: scale(1.06); }

.zm-gallery-item__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--zm-transition);
    color: #fff;
    font-size: 20px;
}

.zm-gallery-item:hover .zm-gallery-item__overlay { opacity: 1; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PROFILE PAGE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.zm-profile-card {
    background: var(--zm-bg-card);
    border: 1px solid var(--zm-border);
    border-radius: var(--zm-radius);
    padding: 32px;
}

.zm-profile-section { margin-bottom: 28px; }

/* ── Avatar upload area (profile page) ───────────────────────────────────── */
.zm-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--zm-border);
    margin-bottom: 28px;
}

.zm-profile-avatar-ring {
    position: relative;
    width: 120px;
    height: 120px;
    cursor: pointer;
}

.zm-profile-avatar-ring::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: conic-gradient(var(--zm-green) 0%, var(--zm-green) 100%);
    z-index: 0;
}

.zm-profile-avatar-ring img,
.zm-profile-avatar-ring .zm-avatar-ph {
    position: relative;
    z-index: 1;
    width: 114px;
    height: 114px;
    border-radius: 50%;
    object-fit: cover;
    margin: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--zm-bg-input);
    font-size: 48px;
    color: var(--zm-text-faint);
}

.zm-avatar-change-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    z-index: 2;
    width: 30px;
    height: 30px;
    background: var(--zm-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #fff;
    border: 2px solid var(--zm-bg-card);
    transition: background var(--zm-transition);
}

.zm-profile-avatar-ring:hover .zm-avatar-change-badge {
    background: #16a34a;
}

.zm-avatar-hint {
    font-size: 12px;
    color: var(--zm-text-faint);
    text-align: center;
}

#zmAvatarInput { display: none; }

.zm-security-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: rgba(255,255,255,0.03);
    padding: 16px 20px;
    border-radius: var(--zm-radius-sm);
    margin-bottom: 16px;
    border: 1px solid var(--zm-border);
}

.zm-security-header h3 { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.zm-security-header p  { font-size: 12px; color: var(--zm-text-muted); }

/* Toggle switch */
.zm-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
}

/* Hide checkbox without display:none so theme CSS cannot show it back */
.zm-toggle input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.zm-toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: #333;
    border-radius: 12px;
    transition: background var(--zm-transition);
    flex-shrink: 0;
}

.zm-toggle-slider::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform var(--zm-transition);
}

.zm-toggle input:checked ~ .zm-toggle-slider { background: var(--zm-green); }
.zm-toggle input:checked ~ .zm-toggle-slider::after { transform: translateX(20px); }

.zm-toggle-label { font-size: 13px; color: var(--zm-text-muted); }

.zm-pw-fields { margin-top: 12px; }

.zm-profile-actions { margin-top: 8px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PAGINATION
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.zm-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.zm-page-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--zm-bg-card);
    border: 1px solid var(--zm-border);
    color: var(--zm-text-muted);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--zm-transition);
}

.zm-page-btn:hover { background: rgba(255,255,255,0.07); color: var(--zm-text); }

.zm-page-btn--active {
    background: var(--zm-green);
    color: #fff;
    border-color: var(--zm-green);
}

.zm-page-ellipsis {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--zm-text-muted);
    font-size: 18px;
    letter-spacing: 1px;
    pointer-events: none;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   VIDEO MODAL
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

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

.zm-modal[hidden] { display: none; }

.zm-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.88);
    backdrop-filter: blur(4px);
}

.zm-modal__box {
    position: relative;
    width: 90vw;
    max-width: 900px;
    z-index: 1;
}

.zm-modal__close {
    position: fixed;
    top: 20px;
    right: 24px;
    background: rgba(255,255,255,0.12);
    border: none;
    border-radius: 50%;
    color: #fff;
    width: 40px;
    height: 40px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0.9;
    transition: background var(--zm-transition), opacity var(--zm-transition);
}

.zm-modal__close:hover { background: rgba(255,255,255,0.25); opacity: 1; }

.zm-modal__video-wrap {
    position: relative;
    padding-top: 56.25%;
    background: #000;
    border-radius: var(--zm-radius);
    overflow: hidden;
}

.zm-modal__video-wrap iframe,
.zm-modal__video-wrap video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   LIGHTBOX
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.zm-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zm-lightbox[hidden] { display: none; }

.zm-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.95);
}

.zm-lightbox__img-wrap {
    position: relative;
    z-index: 1;
    max-width: 92vw;
    max-height: 88vh;
}

.zm-lightbox__img-wrap img {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: var(--zm-radius-sm);
}

.zm-lightbox__close {
    position: fixed;
    top: 20px;
    right: 24px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--zm-transition);
}

.zm-lightbox__close:hover { background: rgba(255,255,255,0.2); }

.zm-lightbox__nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--zm-transition);
}

.zm-lightbox__nav:hover { background: rgba(255,255,255,0.2); }
.zm-lightbox__prev { left: 20px; }
.zm-lightbox__next { right: 20px; }

.zm-lightbox__counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    z-index: 2;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   UTILITY
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.zm-empty {
    text-align: center;
    color: var(--zm-text-muted);
    padding: 48px 20px;
    font-size: 15px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@media ( max-width: 1024px ) {
    .zm-video-grid { grid-template-columns: repeat(2, 1fr); }
    .zm-album-grid { grid-template-columns: repeat(2, 1fr); }
    .zm-gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media ( max-width: 768px ) {
    /* Sidebar off-canvas on mobile */
    .zm-app {
        padding: 16px 16px 48px;
        gap: 0;
    }

    .zm-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: var(--zm-sidebar-w);
        max-height: 100%;
        height: 100%;
        background: var(--zm-bg);
        overflow-y: auto;
        transform: translateX(-100%);
        z-index: 200;
        padding: 24px 16px;
    }

    .zm-sidebar.zm-sidebar--open { transform: translateX(0); }

    .zm-sidebar-overlay.zm-overlay--show {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 199;
    }

    .zm-main-inner { padding: 20px 16px; }
    .zm-mobile-header { display: flex; }

    .zm-page-title { font-size: 22px; }
    .zm-form-row { grid-template-columns: 1fr; }

    .zm-video-grid { grid-template-columns: 1fr; }
    .zm-album-grid { grid-template-columns: 1fr 1fr; }
    .zm-gallery-grid { grid-template-columns: repeat(2, 1fr); }

    .zm-auth-card { padding: 28px 20px; }
    .zm-auth-card--wide { max-width: 100%; }

    .zm-file-table thead th:nth-child(4) { display: none; }
    .zm-file-table td:nth-child(4) { display: none; }
}

@media ( max-width: 480px ) {
    .zm-album-grid { grid-template-columns: 1fr; }
    .zm-gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
