/* ─── Demo Retreats – Partner Dashboard CSS ─────────────────────────────────── */

/* === Layout === */
.partner-body { background: #f0f4f1; margin: 0; }

.pd-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

/* === Sidebar === */
.pd-sidebar {
    background: var(--ink);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 200;
    transition: transform .3s cubic-bezier(.4,0,.2,1);
}

.pd-sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.pd-logo {
    font-family: var(--font-h);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
}
.pd-logo .logo-icon { color: var(--sage); margin-right: 4px; }

.pd-sidebar-close {
    display: none;
    background: none;
    border: none;
    color: rgba(255,255,255,.5);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
}

.pd-partner-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.pd-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--sage);
    color: var(--white);
    font-weight: 700;
    font-size: .95rem;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.pd-partner-info strong { display: block; color: var(--white); font-size: .9rem; }
.pd-partner-info span   { font-size: .78rem; color: rgba(255,255,255,.5); }

.pd-nav { padding: 12px 10px; flex: 1; }
.pd-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 8px;
    color: rgba(255,255,255,.65);
    font-size: .88rem;
    font-weight: 500;
    text-decoration: none;
    transition: all .2s;
    margin-bottom: 2px;
    position: relative;
}
.pd-nav-item:hover         { background: rgba(255,255,255,.08); color: var(--white); }
.pd-nav-item.active        { background: var(--sage); color: var(--white); }
.pd-nav-item i             { width: 16px; text-align: center; flex-shrink: 0; }
.pd-nav-divider            { height: 1px; background: rgba(255,255,255,.08); margin: 10px 4px; }
.pd-nav-logout:hover       { background: rgba(239,68,68,.15); color: #fca5a5; }

.pd-badge {
    margin-left: auto;
    background: var(--earth);
    color: var(--white);
    font-size: .7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 50px;
    min-width: 20px;
    text-align: center;
}

/* === Main area === */
.pd-main { display: flex; flex-direction: column; min-width: 0; }

.pd-topbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.pd-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--ink);
    cursor: pointer;
    padding: 6px;
}
.pd-page-title {
    font-family: var(--font-h);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ink);
    margin: 0;
    flex: 1;
}
.pd-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.pd-content { padding: 28px; flex: 1; }

/* === Stat cards === */
.pd-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 16px; margin-bottom: 28px; }

.pd-stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 22px 24px;
    border: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: box-shadow .2s;
}
.pd-stat-card:hover { box-shadow: var(--shadow); }
.pd-stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.pd-stat-icon.green  { background: var(--sage-l);  color: var(--sage-d); }
.pd-stat-icon.orange { background: #fef3c7; color: #d97706; }
.pd-stat-icon.blue   { background: #dbeafe; color: #2563eb; }
.pd-stat-icon.purple { background: #ede9fe; color: #7c3aed; }
.pd-stat-body strong { display: block; font-size: 1.7rem; font-family: var(--font-h); color: var(--ink); line-height: 1.1; margin-bottom: 4px; }
.pd-stat-body span   { font-size: .8rem; color: var(--ink-mid); }
.pd-stat-body .trend { font-size: .75rem; font-weight: 600; margin-top: 4px; }
.pd-stat-body .trend.up   { color: #16a34a; }
.pd-stat-body .trend.down { color: #dc2626; }

/* === Card / Panel === */
.pd-card {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 24px;
}
.pd-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}
.pd-card-head h2 { font-size: 1rem; font-family: var(--font-b); font-weight: 600; margin: 0; }
.pd-card-body { padding: 22px; }

/* === Tables === */
.pd-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.pd-table th { text-align: left; padding: 10px 14px; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-mid); background: var(--mist); border-bottom: 1px solid var(--border); }
.pd-table td { padding: 14px; border-bottom: 1px solid var(--border); color: var(--ink); vertical-align: middle; }
.pd-table tr:last-child td { border-bottom: none; }
.pd-table tr:hover td { background: #fafcfa; }
.pd-table .td-actions { display: flex; gap: 8px; align-items: center; }

/* === Status badges === */
.status-badge { display: inline-block; padding: 3px 10px; border-radius: 50px; font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.status-active   { background: #d1fae5; color: #065f46; }
.status-draft    { background: #f3f4f6; color: #6b7280; }
.status-pending  { background: #fef3c7; color: #92400e; }
.status-paused   { background: #fee2e2; color: #991b1b; }
.status-new      { background: #dbeafe; color: #1d4ed8; }
.status-read     { background: #f3f4f6; color: #374151; }
.status-replied  { background: #d1fae5; color: #065f46; }

/* === Forms (partner) === */
.pd-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pd-form-full { grid-column: 1 / -1; }
.pd-form-group { display: flex; flex-direction: column; gap: 6px; }
.pd-form-group label { font-size: .85rem; font-weight: 600; color: var(--ink); }
.pd-form-group input,
.pd-form-group select,
.pd-form-group textarea {
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-s);
    font-size: .92rem;
    color: var(--ink);
    background: var(--white);
    outline: none;
    transition: border-color .2s;
    font-family: var(--font-b);
}
.pd-form-group input:focus,
.pd-form-group select:focus,
.pd-form-group textarea:focus { border-color: var(--sage); }
.pd-form-group textarea { min-height: 120px; resize: vertical; }
.pd-form-group .hint { font-size: .78rem; color: var(--ink-mid); }

/* === Activity feed === */
.pd-activity { display: flex; flex-direction: column; gap: 0; }
.pd-activity-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--border); }
.pd-activity-item:last-child { border-bottom: none; }
.pd-activity-dot { width: 32px; height: 32px; border-radius: 50%; background: var(--sage-l); display: flex; align-items: center; justify-content: center; font-size: .75rem; color: var(--sage-d); flex-shrink: 0; margin-top: 2px; }
.pd-activity-body p { font-size: .88rem; color: var(--ink); margin-bottom: 2px; }
.pd-activity-body span { font-size: .76rem; color: var(--ink-mid); }

/* === Auth pages (login / register) === */
.pd-auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a2e1c 0%, #1a1a2e 100%);
    padding: 24px;
}
.pd-auth-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 24px 64px rgba(0,0,0,.3);
}
.pd-auth-logo { text-align: center; margin-bottom: 28px; }
.pd-auth-logo a { font-family: var(--font-h); font-size: 1.5rem; color: var(--ink); }
.pd-auth-logo a span { color: var(--sage); }
.pd-auth-title { font-size: 1.4rem; margin-bottom: 6px; text-align: center; }
.pd-auth-sub   { font-size: .9rem; color: var(--ink-mid); text-align: center; margin-bottom: 28px; }
.pd-auth-foot  { text-align: center; margin-top: 20px; font-size: .88rem; color: var(--ink-mid); }
.pd-auth-foot a { color: var(--sage-d); font-weight: 600; }
.pd-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--ink-mid); font-size: .8rem; }
.pd-divider::before, .pd-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* === Plan badge === */
.plan-badge { display: inline-block; padding: 2px 10px; border-radius: 50px; font-size: .72rem; font-weight: 700; }
.plan-free    { background: var(--sage-l); color: var(--sage-d); }
.plan-pro     { background: #fef3c7; color: #92400e; }
.plan-premium { background: #ede9fe; color: #6d28d9; }

/* === Empty state === */
.pd-empty { text-align: center; padding: 60px 20px; }
.pd-empty i { font-size: 3rem; color: #ccc; display: block; margin-bottom: 16px; }
.pd-empty h3 { font-size: 1.1rem; margin-bottom: 8px; }
.pd-empty p  { font-size: .9rem; color: var(--ink-mid); margin-bottom: 20px; }

/* === Overlay === */
.pd-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 150; }
.pd-overlay.show { display: block; }

/* === Responsive === */
@media (max-width: 1024px) {
    .pd-layout { grid-template-columns: 1fr; }
    .pd-sidebar {
        position: fixed;
        left: 0; top: 0; bottom: 0;
        width: 260px;
        transform: translateX(-100%);
        z-index: 300;
    }
    .pd-sidebar.open { transform: translateX(0); }
    .pd-sidebar-close { display: flex; }
    .pd-menu-toggle   { display: flex; }
}
@media (max-width: 640px) {
    .pd-content       { padding: 18px; }
    .pd-stats         { grid-template-columns: 1fr 1fr; }
    .pd-form-grid     { grid-template-columns: 1fr; }
    .pd-auth-card     { padding: 28px 20px; }
    .pd-topbar        { padding: 0 18px; }
}
@media (max-width: 400px) {
    .pd-stats { grid-template-columns: 1fr; }
}
