:root {
    --primary-yellow: #F4B942;
    --primary-blue: #2D6CDF;
    --primary-gold: #D4A843;
    --primary-sky: #4ECDC4;
    --primary-dark: #1B1F3B;
    --primary-darker: #0F1225;
    --light-bg: #F8F9FC;
    --card-bg: #FFFFFF;
    --text-primary: #1B1F3B;
    --text-secondary: #6C7A89;
    --border-color: #E8ECF1;
    --shadow-sm: 0 2px 8px rgba(27, 31, 59, 0.06);
    --shadow-md: 0 4px 20px rgba(27, 31, 59, 0.1);
    --shadow-lg: 0 8px 40px rgba(27, 31, 59, 0.15);
    --shadow-glow: 0 0 30px rgba(244, 185, 66, 0.2);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

body {
    font-family: 'Kanit', sans-serif;
    background: var(--light-bg);
    color: var(--text-primary);
    min-height: 100vh;
    margin: 0;
}

/* ========= SCROLLBAR ========= */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--primary-yellow); border-radius: 3px; }

* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-yellow) transparent;
}

/* ========= AUTH LAYOUT ========= */
.auth-wrapper {
    height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
}

.auth-left {
    display: grid;
    grid-template: 1fr / 1fr;
    overflow: hidden;
    background: var(--primary-dark);
}

.auth-bg {
    grid-row: 1;
    grid-column: 1;
    overflow: hidden;
}

.auth-bg picture { display: contents; }

.auth-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform-origin: 55% 50%;
    animation: heroKenBurns 14s ease-in-out infinite alternate;
    will-change: transform;
}

.auth-bg-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.auth-overlay {
    grid-row: 1;
    grid-column: 1;
    background: linear-gradient(135deg, rgba(10,12,18,0.86) 0%, rgba(14,16,22,0.7) 55%, rgba(38,32,16,0.55) 100%);
    z-index: 1;
    position: relative;
    will-change: transform;
    transform: translateZ(0);
    pointer-events: none;
}

.auth-content {
    grid-row: 1;
    grid-column: 1;
    z-index: 2;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    text-align: center;
}

.auth-content .brand {
    text-align: center;
}

.auth-content .features {
    margin-top: 60px;
}

.auth-content .brand {
    position: relative;
    z-index: 3;
    text-align: center;
}

.auth-content .features {
    position: relative;
    z-index: 3;
    margin-top: 60px;
}

.auth-left .brand .auth-brand-lockup {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 10px;
}

.auth-left .brand .brand-mark {
    width: 64px;
    height: 64px;
}

.auth-left .brand h1 {
    font-size: 1.65rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: .5px;
    margin: 0;
    white-space: nowrap;
    line-height: 1.2;
}

.auth-left .brand h1 span {
    color: var(--primary-yellow);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .auth-left .brand h1 span {
        background: linear-gradient(135deg, #FFE7A3 0%, #F4B942 55%, #D4A843 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        color: transparent;
    }
}

.auth-left .brand p {
    color: rgba(255,255,255,0.6);
    font-size: 1.1rem;
    letter-spacing: 3px;
    font-weight: 500;
}

.auth-left .brand .logo-icon {
    font-size: 4rem;
    margin-bottom: 24px;
    display: block;
    filter: drop-shadow(0 0 20px rgba(244,185,66,0.4));
}

.auth-content .features .feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
}

.auth-content .features .feature-item i {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(244,185,66,0.15);
    color: var(--primary-yellow);
    font-size: 0.85rem;
}

.auth-right {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px;
    background: #fff;
    position: relative;
    overflow-y: auto;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 2;
    margin: auto 0;
}

.auth-card .auth-header {
    text-align: center;
    margin-bottom: 36px;
}

.auth-card .auth-header h2 {
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--primary-dark);
    margin-bottom: 6px;
}

.auth-card .auth-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ========= FORM ELEMENTS ========= */
.form-group {
    margin-bottom: 18px;
    position: relative;
}

.form-group label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 6px;
    display: block;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: 'Kanit', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--light-bg);
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary-blue);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(45,108,223,0.1);
}

.form-control::placeholder {
    color: #B0B8C1;
    font-weight: 400;
}

.input-group {
    position: relative;
}

.input-group .form-control {
    padding-right: 48px;
}

.input-group .toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-secondary);
    border: none;
    background: none;
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: var(--transition);
}

.input-group .toggle-password:hover {
    color: var(--primary-blue);
}

/* ========= PASSWORD STRENGTH ========= */
.password-strength {
    transition: var(--transition);
}

.strength-bar {
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.strength-bar-fill {
    height: 100%;
    width: 100%;
    border-radius: 3px;
    transform-origin: left center;
    transform: scaleX(0);
    transition: transform 0.3s ease-out, background 0.3s ease;
}

.strength-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: block;
    min-height: 1.2em;
}

/* ========= AVATAR UPLOAD ========= */
.avatar-upload {
    display: flex;
    align-items: center;
    gap: 16px;
}

.avatar-preview {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--border-color);
    flex-shrink: 0;
    background: var(--light-bg);
}

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

.avatar-input-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.avatar-input-wrap input[type="file"] {
    display: none;
}

.avatar-input-wrap .btn-sm {
    padding: 6px 14px;
    font-size: 0.82rem;
    cursor: pointer;
    width: fit-content;
}

.avatar-input-wrap .text-muted {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* ========= PROFILE AVATAR EDIT ========= */
.profile-cover:hover .avatar-edit-overlay {
    opacity: 1;
}

.avatar-edit-overlay {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    bottom: -40px;
    left: 24px;
    background: rgba(27,31,59,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    opacity: 0;
    transition: var(--transition);
    border: 4px solid #fff;
    cursor: pointer;
    z-index: 2;
}

.avatar-edit-overlay:hover {
    background: rgba(244,185,66,0.85);
    color: var(--primary-dark);
}

/* ========= BUTTONS ========= */
.btn {
    font-family: 'Kanit', sans-serif;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-md);
    padding: 12px 24px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
    text-decoration: none;
}

.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-yellow), var(--primary-gold));
    color: var(--primary-dark);
    box-shadow: 0 4px 15px rgba(244,185,66,0.3);
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(244,185,66,0.45);
    color: var(--primary-darker);
    text-decoration: none;
}

.btn-primary-custom:active {
    transform: translateY(0);
}

.btn-blue {
    background: linear-gradient(135deg, var(--primary-blue), #3d7ae8);
    color: #fff;
    box-shadow: 0 4px 15px rgba(45,108,223,0.3);
}

.btn-blue:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(45,108,223,0.45);
    color: #fff;
    text-decoration: none;
}

.btn-outline-custom {
    border: 2px solid var(--border-color);
    background: #fff;
    color: var(--text-primary);
}

.btn-outline-custom:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    background: rgba(45,108,223,0.05);
    text-decoration: none;
}

.btn-sky {
    background: linear-gradient(135deg, var(--primary-sky), #45b7aa);
    color: #fff;
}

.btn-sky:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(78,205,196,0.4);
    color: #fff;
    text-decoration: none;
}

.btn-danger-custom {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: #fff;
}

.btn-danger-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(238,90,36,0.4);
    color: #fff;
    text-decoration: none;
}

.btn-warning-custom {
    background: linear-gradient(135deg, var(--primary-gold), #D89A18);
    color: #fff;
    box-shadow: 0 4px 15px rgba(212,168,67,0.3);
}

.btn-warning-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(212,168,67,0.45);
    color: #fff;
    text-decoration: none;
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1.05rem;
}

/* ========= UPLOAD ZONE ========= */
.upload-zone {
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 32px 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--primary-blue);
    background: rgba(45,108,223,0.04);
}
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 12px;
}
.img-preview {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    background: #f5f5f5;
    border: 1px solid #eee;
}
.img-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.img-preview .img-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(220,53,69,0.9);
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.img-preview .img-remove::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
}
.img-preview .img-order {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 4px;
}

/* ========= DIVIDER ========= */
.divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    gap: 14px;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========= SOCIAL BUTTONS ========= */
.social-login {
    display: flex;
    gap: 12px;
}
.social-legal-note {
    margin: 12px 0 0;
    color: var(--text-secondary);
    font-size: 0.76rem;
    line-height: 1.6;
    text-align: center;
}
.social-legal-note a { color: var(--primary-blue); font-weight: 600; text-decoration: none; }
.social-legal-note a:hover { color: var(--primary-yellow); text-decoration: none; }

.social-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Kanit', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    text-decoration: none;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.social-btn.google:hover {
    border-color: #DB4437;
    color: #DB4437;
}

.social-btn.line:hover {
    border-color: #00C300;
    color: #00C300;
}

.social-btn i {
    font-size: 1.2rem;
}

/* ========= ADMIN LAYOUT ========= */
.admin-wrapper {
    min-height: 100vh;
    display: flex;
}

.admin-sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary-darker) 100%);
    color: #fff;
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    overflow-y: auto;
    transition: var(--transition);
}

.admin-sidebar .sidebar-brand {
    padding: 28px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-align: center;
}
.admin-sidebar .sidebar-brand .brand-mark {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
}

.admin-sidebar .sidebar-brand h3 {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin: 0;
    color: #fff;
    white-space: nowrap;
}

.admin-sidebar .sidebar-brand h3 span {
    color: var(--primary-yellow);
}

.admin-sidebar .sidebar-brand small {
    display: block;
    color: rgba(255,255,255,0.4);
    font-size: 0.75rem;
    margin-top: 4px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.admin-sidebar .sidebar-menu {
    padding: 16px 0;
    list-style: none;
    margin: 0;
}

.admin-sidebar .sidebar-menu .menu-label {
    padding: 8px 24px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.3);
    font-weight: 500;
}

.admin-sidebar .sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 600;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
}

.admin-sidebar .sidebar-menu li a:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}

.admin-sidebar .sidebar-menu li a.active {
    color: var(--primary-yellow);
    background: rgba(244,185,66,0.08);
    border-left-color: var(--primary-yellow);
}

.admin-sidebar .sidebar-menu li a i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.admin-sidebar .sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.2);
}

.admin-sidebar .sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
}

.admin-sidebar .sidebar-footer a:hover {
    color: var(--primary-yellow);
}

.admin-main {
    margin-left: 280px;
    flex: 1;
    min-height: 100vh;
    background: var(--light-bg);
}

.admin-topbar {
    background: #fff;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-topbar .page-title {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--primary-dark);
    margin: 0;
}

.admin-topbar .user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-topbar .user-info img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-yellow);
}

.admin-topbar .user-info span {
    font-weight: 600;
    font-size: 0.9rem;
}

.admin-content {
    padding: 32px;
}

/* ========= DASHBOARD ========= */
.dash-wrapper {
    min-height: 100vh;
    background: var(--light-bg);
}

.dash-topbar {
    background: var(--primary-dark);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.dash-topbar .brand {
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 3px;
    text-decoration: none;
    white-space: nowrap;
}

.dash-topbar .brand span { color: var(--primary-yellow); }

.dash-topbar .nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dash-topbar .nav-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
}

.dash-topbar .nav-links a:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
    text-decoration: none;
}

.dash-topbar .user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    cursor: pointer;
}

.dash-topbar .user-menu img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-yellow);
}

.dash-content {
    padding: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ========= STAT CARDS ========= */
.stat-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    border-radius: 0 0 0 100%;
    opacity: 0.06;
}

.stat-card.yellow::after { background: var(--primary-yellow); }
.stat-card.blue::after { background: var(--primary-blue); }
.stat-card.sky::after { background: var(--primary-sky); }
.stat-card.gold::after { background: var(--primary-gold); }

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

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 16px;
}

.stat-card.yellow .stat-icon { background: rgba(244,185,66,0.12); color: var(--primary-yellow); }
.stat-card.blue .stat-icon { background: rgba(45,108,223,0.12); color: var(--primary-blue); }
.stat-card.sky .stat-icon { background: rgba(78,205,196,0.12); color: var(--primary-sky); }
.stat-card.gold .stat-icon { background: rgba(212,168,67,0.12); color: var(--primary-gold); }

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary-dark);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ========= DATA TABLE ========= */
.data-table {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.data-table .table-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.data-table .table-header h5 {
    font-weight: 500;
    margin: 0;
    font-size: 1.1rem;
}

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

.table-custom thead th {
    padding: 14px 20px;
    background: var(--light-bg);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    font-weight: 500;
    border: none;
    white-space: nowrap;
}

.table-custom tbody td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    vertical-align: middle;
}

.table-custom tbody tr:hover {
    background: rgba(244,185,66,0.03);
}

.table-custom tbody tr:last-child td {
    border-bottom: none;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-cell img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.user-cell .user-name {
    font-weight: 500;
    color: var(--primary-dark);
}

.user-cell .user-email {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ========= BADGE ========= */
.badge-custom {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-custom.active { background: rgba(78,205,196,0.12); color: var(--primary-sky); }
.badge-custom.inactive { background: rgba(255,107,107,0.12); color: #ff6b6b; }
.badge-custom.google { background: rgba(219,68,55,0.12); color: #DB4437; }
.badge-custom.line { background: rgba(0,195,0,0.12); color: #00C300; }
.badge-custom.local { background: rgba(45,108,223,0.12); color: var(--primary-blue); }

/* ========= PROFILE CARD ========= */
.profile-card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.profile-card .profile-cover {
    height: 120px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-blue));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    position: relative;
}

.profile-card .profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: var(--shadow-md);
    background: #fff;
    position: absolute;
    bottom: -40px;
    left: 24px;
}

.profile-card .profile-info {
    padding: 48px 24px 24px;
}

.profile-card .profile-info h4 {
    font-weight: 500;
    margin-bottom: 2px;
}

.profile-card .profile-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.profile-details {
    padding: 0 24px 24px;
}

.profile-details .detail-row {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
}

.profile-details .detail-row:last-child {
    border-bottom: none;
}

.profile-details .detail-row i {
    width: 20px;
    color: var(--primary-yellow);
    text-align: center;
}

.profile-details .detail-row .detail-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    min-width: 100px;
}

.profile-details .detail-row .detail-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* ========= ALERTS ========= */
.alert-custom {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.alert-custom.success {
    background: rgba(78,205,196,0.12);
    color: #1a9e8f;
    border: 2px solid rgba(78,205,196,0.3);
}

.alert-custom.error {
    background: rgba(255,107,107,0.12);
    color: #d63031;
    border: 2px solid rgba(255,107,107,0.3);
    animation: slideDown 0.3s ease, shake 0.5s ease 0.1s;
}

.alert-custom.warning {
    background: rgba(244,185,66,0.12);
    color: #b8860b;
    border: 2px solid rgba(244,185,66,0.3);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.spin {
    animation: spin 0.6s linear infinite;
}

/* ========= MODAL ========= */
.modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 20px 24px;
}

.modal-header .modal-title {
    font-weight: 500;
}

.modal-body { padding: 24px; }
.modal-footer { border-top: 1px solid var(--border-color); padding: 16px 24px; }

/* ========= LOADING ========= */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.page-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.page-loader::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-yellow);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ========= EMPTY STATE ========= */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 3rem;
    color: var(--border-color);
    margin-bottom: 16px;
}

.empty-state h5 {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ========= SEARCH ========= */
.search-box {
    position: relative;
    max-width: 300px;
}

.search-box input {
    padding-left: 40px;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

/* ========= PAGINATION ========= */
.pagination-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 24px;
}

.pagination-custom a, .pagination-custom span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.pagination-custom a:hover {
    background: var(--primary-yellow);
    color: var(--primary-dark);
    border-color: var(--primary-yellow);
    text-decoration: none;
}

.pagination-custom .active {
    background: var(--primary-yellow);
    color: var(--primary-dark);
    border-color: var(--primary-yellow);
}

/* ========= RESPONSIVE ========= */
@media (max-width: 992px) {
    .auth-wrapper {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 100vh;
    }
    .auth-left {
        padding: 40px 30px;
        min-height: 300px;
        height: auto;
    }
    .auth-left .brand h1 { font-size: 1.35rem; }
    .auth-left .brand .brand-mark { width: 52px; height: 52px; }
    .auth-content .features { display: none; }
    .auth-right { padding: 30px; overflow-y: auto; }
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.show { transform: translateX(0); }
    .admin-main { margin-left: 0; }
}

@media (max-width: 576px) {
    .auth-card { max-width: 100%; }
    .auth-left .brand h1 { font-size: 1.15rem; }
    .auth-left .brand .brand-mark { width: 46px; height: 46px; }
    .public-nav .public-brand { font-size: 1rem; letter-spacing: .3px; gap: 8px; }
    .public-nav .public-brand .brand-mark { width: 32px; height: 32px; }
    .social-login { flex-direction: column; }
    .stat-card { margin-bottom: 16px; }
    .dash-content, .admin-content { padding: 16px; }
    .table-custom { font-size: 0.8rem; }
}

/* ========= ANIMATIONS ========= */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========= CHECKBOX ========= */
.form-check-custom {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check-custom input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-yellow);
    cursor: pointer;
}

.form-check-custom label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
}

.form-check-legal { align-items: flex-start; }
.form-check-legal input[type="checkbox"] { flex: 0 0 auto; margin-top: 2px; }
.form-check-legal label { line-height: 1.6; }

/* Inline error ใต้ checkbox (social sign-up) */
.form-check-custom.has-field-error { display: block; }
.form-check-line { display: flex; align-items: flex-start; gap: 8px; }
.field-error {
    color: #d63031;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 6px;
    line-height: 1.5;
}
.field-error[hidden] { display: none; }
.form-check-custom.has-error .form-check-line label { color: #d63031; }
.form-check-custom.has-error input[type="checkbox"] {
    outline: 2px solid #d63031;
    outline-offset: 2px;
}

/* ========= LINK STYLE ========= */
.link-custom {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.link-custom:hover {
    color: var(--primary-yellow);
    text-decoration: none;
}

.auth-legal-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin: 14px 0 0;
    font-size: 0.78rem;
    line-height: 1.5;
}
.auth-legal-links a { color: var(--text-secondary); text-decoration: none; }
.auth-legal-links a:hover { color: var(--primary-blue); text-decoration: none; }
.auth-legal-links span { color: var(--border-color); }

/* ========= SIDEBAR MOBILE TOGGLE ========= */
.sidebar-toggle {
    display: none;
    background: var(--primary-dark);
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.1rem;
}

@media (max-width: 992px) {
    .sidebar-toggle { display: block; }
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.sidebar-overlay.show { display: block; }

/* ========= LANDING PAGE ========= */
.lp-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.public-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(15,18,37,0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}
.public-nav.scrolled { background: var(--primary-dark); box-shadow: 0 4px 20px rgba(0,0,0,0.25); }
.public-nav-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 24px;
    height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.public-brand {
    display: flex; align-items: center; gap: 10px;
    color: #fff; text-decoration: none; font-weight: 600; font-size: 1.15rem; letter-spacing: 1px;
}
.public-brand:hover { color: #fff; text-decoration: none; }
.public-brand .public-brand-accent { color: var(--primary-yellow); }
.brand-mark { display: block; flex: none; }
.public-brand .brand-mark { width: 36px; height: 36px; }
.public-brand .brand-text { white-space: nowrap; }
.public-nav-links { display: flex; align-items: center; gap: 8px; }
.public-nav-links > a {
    color: rgba(255,255,255,0.75); text-decoration: none; font-weight: 500; font-size: 0.95rem;
    padding: 8px 14px; border-radius: 8px; transition: all 0.2s ease;
}
.public-nav-links > a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.public-nav-links > a.active { color: var(--primary-yellow); background: rgba(244,185,66,0.1); }
.public-nav-actions { display: flex; align-items: center; gap: 10px; margin-left: 12px; }
.public-link { color: rgba(255,255,255,0.85); text-decoration: none; font-weight: 500; font-size: 0.92rem; transition: color 0.2s; }
.public-link:hover { color: var(--primary-yellow); text-decoration: none; }
.public-btn { padding: 10px 20px; border-radius: 10px; font-weight: 600; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; transition: all 0.25s ease; border: none; }
.public-btn-gold { background: linear-gradient(135deg, var(--primary-yellow), var(--primary-gold)); color: var(--primary-dark); box-shadow: 0 4px 15px rgba(244,185,66,0.35); }
.public-btn-gold:hover { transform: translateY(-2px); color: var(--primary-darker); box-shadow: 0 6px 24px rgba(244,185,66,0.5); text-decoration: none; }
.public-btn-dark { background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.25); }
.public-btn-dark:hover { background: rgba(255,255,255,0.2); color: #fff; text-decoration: none; }
.public-nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.6rem; cursor: pointer; padding: 4px 8px; }

/* HERO */
.lp-hero { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--primary-darker); }
.lp-hero picture { display: contents; }
.lp-hero-media {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; object-position: center;
    transform-origin: 55% 50%;
    animation: heroKenBurns 12s ease-in-out infinite alternate;
    will-change: transform;
}
@keyframes heroKenBurns {
    0%   { transform: scale(1.04) translate3d(0, 0, 0); }
    100% { transform: scale(1.22) translate3d(-3.5%, -2%, 0); }
}
.lp-hero-overlay {
    position: absolute; inset: 0;
    background:
        linear-gradient(180deg, rgba(8,10,14,0.74) 0%, rgba(8,10,14,0.38) 45%, rgba(8,10,14,0.84) 100%),
        linear-gradient(135deg, rgba(22,26,16,0.45) 0%, rgba(28,24,12,0.18) 55%, rgba(8,10,14,0.4) 100%);
}
.lp-hero-content { position: relative; z-index: 2; text-align: center; color: #fff; padding: 120px 24px 80px; max-width: 900px; }
.lp-hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(244,185,66,0.15); color: var(--primary-yellow); border: 1px solid rgba(244,185,66,0.35);
    padding: 8px 18px; border-radius: 40px; font-weight: 500; font-size: 0.9rem; margin-bottom: 24px;
}
.lp-hero-content h1 { font-size: clamp(2.2rem, 5.5vw, 4rem); font-weight: 700; letter-spacing: 1px; margin-bottom: 20px; line-height: 1.2; }
.lp-accent { color: var(--primary-yellow); }
.lp-hero-content p { color: rgba(255,255,255,0.85); font-size: 1.15rem; font-weight: 300; max-width: 640px; margin: 0 auto 36px; line-height: 1.8; }
.lp-hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 56px; }
.lp-btn { border-radius: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; padding: 13px 28px; text-decoration: none; transition: all 0.25s ease; border: none; }
.lp-btn:hover { text-decoration: none; transform: translateY(-2px); }
.lp-btn-gold { background: linear-gradient(135deg, var(--primary-yellow), var(--primary-gold)); color: var(--primary-dark); box-shadow: 0 6px 22px rgba(244,185,66,0.4); }
.lp-btn-gold:hover { color: var(--primary-darker); box-shadow: 0 10px 30px rgba(244,185,66,0.55); }
.lp-btn-blue { background: linear-gradient(135deg, var(--primary-blue), #3d7ae8); color: #fff; box-shadow: 0 6px 22px rgba(45,108,223,0.35); }
.lp-btn-blue:hover { color: #fff; box-shadow: 0 10px 30px rgba(45,108,223,0.5); }
.lp-btn-ghost { background: rgba(255,255,255,0.1); color: #fff; border: 1.5px solid rgba(255,255,255,0.35); backdrop-filter: blur(6px); }
.lp-btn-ghost:hover { background: rgba(255,255,255,0.2); color: #fff; }
.lp-hero-stats { display: flex; justify-content: center; gap: 48px; }
.lp-hero-stats div { display: flex; flex-direction: column; align-items: center; }
.lp-hero-stats strong { font-size: 1.9rem; font-weight: 700; color: var(--primary-yellow); }
.lp-hero-stats span { color: rgba(255,255,255,0.6); font-size: 0.85rem; font-weight: 500; }
.lp-hero-scroll { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,0.6); font-size: 1.4rem; animation: lpFloat 2.4s ease-in-out infinite; z-index: 2; }
@keyframes lpFloat { 0%,100% { transform: translate(-50%,0); opacity:.55 } 50% { transform: translate(-50%,6px); opacity:1 } }

@media (prefers-reduced-motion: reduce) {
    .lp-hero-media,
    .auth-media { animation: none; transform: none; }
}

/* SECTIONS */
.lp-section { padding: 88px 0; }
.lp-section.lp-top-pad { padding-top: 130px; }
.lp-section-light { background: var(--light-bg); }
.lp-benefits {
    position: relative;
    background: url('../img/benefits-bg.jpg') center/cover no-repeat fixed;
    isolation: isolate;
}
.lp-benefits::before {
    content: '';
    position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, rgba(248,249,252,0.94) 0%, rgba(248,249,252,0.82) 50%, rgba(248,249,252,0.94) 100%);
}
.lp-benefits .lp-benefit {
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.85);
    box-shadow: 0 8px 28px rgba(15,18,37,0.08);
}
.lp-ads-bg {
    position: relative;
    background: url('../img/ads-bg.jpg') center/cover no-repeat fixed;
    isolation: isolate;
}
.lp-ads-bg::before {
    content: '';
    position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, rgba(248,249,252,0.93) 0%, rgba(248,249,252,0.8) 50%, rgba(248,249,252,0.93) 100%);
}
.lp-ads-bg .lp-ad-block {
    background: rgba(255,255,255,0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.85);
    box-shadow: 0 10px 30px rgba(15,18,37,0.1);
}
.lp-ads-bg .ad-slot-empty { background: rgba(255,255,255,0.35); border-color: rgba(45,108,223,0.35); }
.lp-section-head { text-align: center; max-width: 700px; margin: 0 auto 52px; }
.lp-section-head h2 { font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.3rem); color: var(--primary-dark); margin-bottom: 12px; }
.lp-section-head p { color: var(--text-secondary); font-size: 1rem; margin-bottom: 8px; }
.lp-eyebrow { display: inline-block; font-weight: 600; font-size: 0.8rem; letter-spacing: 3px; text-transform: uppercase; color: var(--primary-blue); margin-bottom: 12px; }
.lp-eyebrow-light { color: var(--primary-yellow); }
.lp-text-link { color: var(--primary-blue); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: all 0.2s; }
.lp-text-link:hover { color: var(--primary-yellow); text-decoration: none; }

/* BENEFITS */
.lp-benefit-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.lp-benefit { background: #fff; border-radius: var(--radius-lg); padding: 32px 26px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); transition: all 0.3s ease; }
.lp-benefit:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.lp-benefit-icon { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 18px; }
.lp-benefit-icon.yellow { background: rgba(244,185,66,0.12); color: var(--primary-yellow); }
.lp-benefit-icon.blue { background: rgba(45,108,223,0.12); color: var(--primary-blue); }
.lp-benefit-icon.sky { background: rgba(78,205,196,0.12); color: var(--primary-sky); }
.lp-benefit-icon.gold { background: rgba(212,168,67,0.12); color: var(--primary-gold); }
.lp-benefit h4 { font-weight: 600; font-size: 1.05rem; margin-bottom: 10px; color: var(--primary-dark); }
.lp-benefit p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; margin: 0; }

/* AD SLOTS */
.lp-ad-block { background: #fff; border-radius: var(--radius-lg); padding: 26px; margin-bottom: 28px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); }
.lp-ad-block-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.lp-ad-tag { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--primary-dark); font-size: 0.95rem; }
.lp-ad-tag i { color: var(--primary-yellow); }
.lp-ad-price-tag { background: rgba(244,185,66,0.15); color: #b8860b; font-weight: 600; font-size: 0.85rem; padding: 6px 14px; border-radius: 30px; }
.ad-card { display: block; background: #fff; border-radius: 14px; overflow: hidden; border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); transition: all 0.3s ease; text-decoration: none; height: 100%; }
.ad-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); text-decoration: none; }
.ad-card-img { position: relative; overflow: hidden; background: #f2f4f8; }
.ad-card-lg .ad-card-img { aspect-ratio: 21 / 6; }
.ad-card-sm .ad-card-img { aspect-ratio: 16 / 10; }
.ad-card-img img { width: 100%; height: 100%; object-fit: cover; }
.ad-card-ph, .lp-topic-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #b9c1cc; font-size: 1.8rem; background: linear-gradient(135deg, #eef1f6, #e2e7ef); }
.ad-card-badge { position: absolute; top: 12px; left: 12px; background: linear-gradient(135deg, var(--primary-yellow), var(--primary-gold)); color: var(--primary-dark); font-size: 0.72rem; font-weight: 700; padding: 4px 12px; border-radius: 30px; display: inline-flex; align-items: center; gap: 5px; }
.ad-card-body { padding: 14px 16px; }
.ad-card-title { font-weight: 600; color: var(--primary-dark); font-size: 0.95rem; margin-bottom: 6px; line-height: 1.4; }
.ad-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 0.8rem; color: var(--text-secondary); }
.ad-card-price { color: #d63031; font-weight: 700; }
.ad-slot-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 34px 20px; border: 2px dashed var(--border-color); border-radius: 14px; color: var(--text-secondary); text-decoration: none; transition: all 0.25s ease; }
.ad-slot-empty:hover { border-color: var(--primary-yellow); color: var(--primary-dark); background: rgba(244,185,66,0.04); text-decoration: none; }
.ad-slot-empty-icon { width: 52px; height: 52px; border-radius: 50%; background: rgba(45,108,223,0.1); color: var(--primary-blue); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 4px; }
.ad-slot-empty strong { color: var(--primary-dark); }
.ad-slot-empty span { font-size: 0.85rem; }
.ad-slot-empty span i { color: var(--primary-blue); }
.lp-ad-grid { display: grid; gap: 18px; }
.lp-ad-grid-center { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.lp-ad-grid-side { grid-template-columns: 1fr; }
.lp-ad-grid-bottom { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.lp-ad-block-left, .lp-ad-block-right { display: grid; grid-template-columns: 1fr; }
.lp-ad-row-3 { display: grid; grid-template-columns: 1fr 1.6fr 1fr; gap: 28px; align-items: stretch; }

/* TOPIC CARDS */
.lp-topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 24px; }
.lp-topic-card { display: block; background: #fff; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); transition: all 0.3s ease; text-decoration: none; }
.lp-topic-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); text-decoration: none; }
.lp-topic-img { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #f2f4f8; }
.lp-topic-img img { width: 100%; height: 100%; object-fit: cover; }
.lp-topic-status { position: absolute; top: 10px; left: 10px; background: rgba(27,31,59,0.75); color: #fff; font-size: 0.72rem; font-weight: 600; padding: 3px 12px; border-radius: 20px; backdrop-filter: blur(4px); }
.lp-topic-body { padding: 16px 18px 18px; }
.lp-topic-title { font-weight: 600; color: var(--primary-dark); font-size: 0.98rem; margin-bottom: 8px; line-height: 1.4; min-height: 2.6em; }
.lp-topic-price { color: #d63031; font-weight: 700; font-size: 1.05rem; margin-bottom: 10px; }
.lp-topic-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; color: var(--text-secondary); font-size: 0.8rem; }
.lp-topic-meta span { display: inline-flex; align-items: center; gap: 5px; }
.lp-topic-meta i { color: var(--primary-yellow); }
.lp-topic-area { margin-left: auto; white-space: nowrap; }
.lp-topic-sub { flex-basis: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; }
.lp-topic-posted { color: var(--text-secondary); }
.lp-topic-views { color: var(--text-secondary); white-space: nowrap; }

/* FAVORITES */
.lp-topic-card-wrap { position: relative; height: 100%; transition: transform 0.3s ease; }
.lp-topic-card-wrap .lp-topic-card { height: 100%; display: flex; flex-direction: column; }
.lp-topic-card-wrap .lp-topic-body { flex: 1; }
.lp-topic-card-wrap:hover { transform: translateY(-6px); }
.lp-topic-card-wrap:hover .lp-topic-card { box-shadow: var(--shadow-md); }
.lp-topic-card-wrap .lp-topic-card:hover { transform: none; }
.lp-fav-btn { position: absolute; top: 10px; right: 10px; z-index: 3; width: 38px; height: 38px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(27,31,59,0.12); background: rgba(255,255,255,0.95); color: var(--primary-dark); font-size: 1rem; box-shadow: 0 2px 10px rgba(27,31,59,0.18); cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(-4px) scale(0.92); transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.lp-topic-card-wrap:hover .lp-fav-btn,
.lp-topic-card-wrap:focus-within .lp-fav-btn,
.lp-fav-btn.active { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.lp-topic-card-wrap .lp-fav-btn:hover { transform: scale(1.08); color: #d63031; background: #fff; }
.lp-fav-btn.active { color: #fff; background: linear-gradient(135deg, #ef5350, #d63031); border-color: transparent; }
.lp-fav-btn:focus-visible, .lp-fav-detail:focus-visible { outline: 3px solid rgba(244,185,66,0.6); outline-offset: 2px; }
.lp-fav-btn:disabled, .lp-fav-detail:disabled { opacity: 0.6; cursor: wait; }
@media (hover: none) {
    .lp-fav-btn { opacity: 1; pointer-events: auto; transform: none; }
}
.lp-fav-detail { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 14px; padding: 11px 16px; border-radius: 10px; border: 1.5px solid rgba(27,31,59,0.15); background: #fff; color: var(--primary-dark); font-weight: 600; font-size: 0.95rem; transition: all 0.2s ease; }
.lp-fav-detail:hover { border-color: var(--primary-yellow); background: #fffaf0; }
.lp-fav-detail.active { border-color: #e05a4f; background: #fff2f1; color: #c0392b; }
.site-toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.site-toast { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 12px; background: var(--primary-dark); color: #fff; font-size: 0.92rem; box-shadow: 0 8px 28px rgba(0,0,0,0.22); opacity: 0; transform: translateY(12px); transition: all 0.25s ease; max-width: calc(100vw - 40px); }
.site-toast.show { opacity: 1; transform: translateY(0); }
.site-toast i { color: var(--primary-yellow); font-size: 1.05rem; }
.site-toast.error i { color: #ff6b6b; }
@media (max-width: 575px) {
    .lp-fav-btn { width: 34px; height: 34px; font-size: 0.92rem; }
    .site-toast-stack { right: 16px; bottom: 16px; }
}

/* FEATURED / SPONSORED ADS */
.lp-featured-ads { position: relative; background: url('../img/featured-bg.jpg') center/cover no-repeat fixed; isolation: isolate; }
.lp-featured-ads::before { content: ''; position: absolute; inset: 0; z-index: 0; background: linear-gradient(135deg, rgba(255,249,230,0.92) 0%, rgba(255,243,204,0.85) 50%, rgba(255,249,230,0.92) 100%); }
.lp-featured-ads::after { content: ''; position: absolute; inset: 0; z-index: 0; border-top: 3px solid var(--primary-yellow); border-bottom: 3px solid var(--primary-yellow); pointer-events: none; }
.lp-featured-ads .lp-container { position: relative; z-index: 1; }
.lp-featured-card { border: 2px solid rgba(244,185,66,0.35) !important; box-shadow: 0 4px 20px rgba(244,185,66,0.12) !important; }
.lp-featured-card:hover, .lp-topic-card-wrap:hover .lp-featured-card { border-color: var(--primary-yellow) !important; box-shadow: 0 8px 32px rgba(244,185,66,0.22) !important; }
.lp-featured-badge { position: absolute; top: 10px; right: 10px; left: auto; background: linear-gradient(135deg, var(--primary-yellow), var(--primary-gold)); color: var(--primary-dark); font-size: 0.72rem; font-weight: 700; padding: 4px 14px; border-radius: 20px; display: inline-flex; align-items: center; gap: 5px; z-index: 2; box-shadow: 0 2px 8px rgba(244,185,66,0.3); }
.lp-topic-card-wrap .lp-featured-badge { top: auto; right: auto; bottom: 10px; left: 10px; }

/* CTA */
.lp-cta { position: relative; padding: 80px 0; overflow: hidden; background: var(--primary-dark); }
.lp-cta-bg { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(45,108,223,0.35), rgba(244,185,66,0.15)); }
.lp-cta-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; color: #fff; }
.lp-cta-inner h2 { font-weight: 700; font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 10px; }
.lp-cta-inner p { color: rgba(255,255,255,0.8); margin: 0; max-width: 520px; line-height: 1.7; }
.lp-cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.lp-final-cta { padding: 80px 24px; text-align: center; background: linear-gradient(135deg, var(--primary-darker), var(--primary-dark)); }
.lp-final-cta h2 { color: #fff; font-weight: 700; font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 10px; }
.lp-final-cta p { color: rgba(255,255,255,0.75); margin-bottom: 28px; }

/* ARTICLES */
.lp-article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.lp-article-grid-list .lp-article-card { display: flex; flex-direction: column; }
.lp-article-card { display: block; background: #fff; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); transition: all 0.3s ease; text-decoration: none; }
.lp-article-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); text-decoration: none; }
.lp-article-img { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #f2f4f8; }
.lp-article-img img { width: 100%; height: 100%; object-fit: cover; }
.lp-article-cat { position: absolute; bottom: 12px; left: 12px; background: linear-gradient(135deg, var(--primary-yellow), var(--primary-gold)); color: var(--primary-dark); font-size: 0.72rem; font-weight: 700; padding: 4px 12px; border-radius: 20px; }
.lp-article-body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.lp-article-body h4 { font-weight: 600; color: var(--primary-dark); font-size: 1rem; margin-bottom: 8px; line-height: 1.5; }
.lp-article-body p { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.6; flex: 1; }
.lp-article-meta { display: flex; align-items: center; gap: 16px; color: var(--text-secondary); font-size: 0.78rem; margin-top: 8px; }
.lp-article-meta span { display: inline-flex; align-items: center; gap: 5px; }

/* CARD IMAGE HOVER — soft golden-orange wash */
.ad-card-badge, .lp-topic-status, .lp-article-cat { z-index: 2; }
.ad-card-img::after, .lp-topic-img::after, .lp-article-img::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(244,185,66,0) 0%, rgba(212,168,67,0.24) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}
.ad-card-img img, .lp-topic-img img, .lp-article-img img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.ad-card:hover .ad-card-img::after,
.lp-topic-card:hover .lp-topic-img::after,
.lp-topic-card-wrap:hover .lp-topic-img::after,
.lp-article-card:hover .lp-article-img::after { opacity: 1; }
.ad-card:hover .ad-card-img img,
.lp-topic-card:hover .lp-topic-img img,
.lp-topic-card-wrap:hover .lp-topic-img img,
.lp-article-card:hover .lp-article-img img { transform: scale(1.05); }

@media (prefers-reduced-motion: reduce) {
    .ad-card-img img, .lp-topic-img img, .lp-article-img img { transition: none; }
    .lp-topic-card-wrap { transition: none; }
    .ad-card:hover .ad-card-img img,
    .lp-topic-card:hover .lp-topic-img img,
    .lp-topic-card-wrap:hover .lp-topic-img img,
    .lp-article-card:hover .lp-article-img img { transform: none; }
    .lp-topic-card-wrap:hover { transform: none; }
}

/* PAGE HERO (inner pages) */
.lp-page-hero { position: relative; padding: 150px 0 70px; background: linear-gradient(135deg, var(--primary-darker), var(--primary-dark)); overflow: hidden; }
.lp-page-hero::after { content: ''; position: absolute; top: -80px; right: -80px; width: 300px; height: 300px; background: radial-gradient(circle, rgba(244,185,66,0.2), transparent 70%); }
.lp-page-hero-sm { padding: 140px 0 60px; }
.lp-page-hero-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(45,108,223,0.25), transparent 60%); }
.lp-page-hero-inner { position: relative; z-index: 2; color: #fff; }
.lp-page-hero-inner h1 { font-weight: 700; font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 14px; }
.lp-page-hero-inner p { color: rgba(255,255,255,0.8); font-size: 1.05rem; max-width: 640px; margin: 0; }

/* LAYOUT DIAGRAM */
.lp-layout-diagram { background: #fff; border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-sm); }
.lp-layout-top { padding-bottom: 16px; }
.lp-layout-middle { display: grid; grid-template-columns: 160px 1fr 160px; gap: 16px; align-items: stretch; padding: 16px 0; border-top: 1px dashed var(--border-color); border-bottom: 1px dashed var(--border-color); }
.lp-layout-bottom { padding-top: 16px; }
.lp-layout-slot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 2px dashed rgba(244,185,66,0.6); background: rgba(244,185,66,0.06); color: #b8860b; border-radius: 14px; padding: 18px; font-weight: 600; text-decoration: none; transition: all 0.25s ease; min-height: 90px; }
.lp-layout-slot:hover { background: rgba(244,185,66,0.15); border-color: var(--primary-yellow); color: #8a6a00; text-decoration: none; }
.lp-layout-slot i { font-size: 1.5rem; }
.slot-top { min-height: 70px; flex-direction: row; gap: 12px; }
.slot-bottom { min-height: 70px; flex-direction: row; gap: 12px; }
.lp-layout-center { display: grid; grid-template-columns: 1fr; gap: 12px; }
.lp-layout-content { border: 2px solid var(--border-color); border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--text-secondary); background: var(--light-bg); padding: 20px; min-height: 120px; }
.lp-layout-content i { font-size: 1.8rem; color: var(--primary-blue); }
.lp-layout-content span { font-weight: 500; font-size: 0.85rem; }

/* PRICE CARDS */
.lp-price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 24px; align-items: stretch; }
.lp-price-card { position: relative; background: #fff; border-radius: var(--radius-lg); border: 2px solid var(--border-color); padding: 32px 24px; text-align: center; box-shadow: var(--shadow-sm); transition: all 0.3s ease; display: flex; flex-direction: column; }
.lp-price-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.lp-price-card.featured { border-color: var(--primary-yellow); box-shadow: 0 10px 30px rgba(244,185,66,0.15); }
.lp-price-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, var(--primary-yellow), var(--primary-gold)); color: var(--primary-dark); font-size: 0.72rem; font-weight: 700; padding: 4px 16px; border-radius: 20px; white-space: nowrap; }
.lp-price-icon { width: 58px; height: 58px; margin: 0 auto 16px; border-radius: 16px; background: rgba(45,108,223,0.1); color: var(--primary-blue); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.featured .lp-price-icon { background: rgba(244,185,66,0.15); color: var(--primary-gold); }
.lp-price-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--primary-dark); margin-bottom: 12px; }
.lp-price-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 16px; }
.lp-price-tags span { font-size: 0.72rem; color: var(--text-secondary); background: var(--light-bg); border: 1px solid var(--border-color); padding: 3px 10px; border-radius: 20px; display: inline-flex; align-items: center; gap: 5px; }
.lp-price-value { font-size: 1.9rem; font-weight: 700; color: var(--primary-dark); margin-bottom: 10px; }
.lp-price-value small { font-size: 1rem; color: var(--text-secondary); }
.lp-price-desc { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.6; flex: 1; margin-bottom: 18px; }
.lp-price-note { display: flex; align-items: center; gap: 10px; margin-top: 32px; background: rgba(45,108,223,0.06); border: 1px solid rgba(45,108,223,0.15); padding: 14px 18px; border-radius: 12px; color: var(--text-secondary); font-size: 0.88rem; }
.lp-price-note i { color: var(--primary-blue); font-size: 1.2rem; }

/* STEPS */
.lp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.lp-step { position: relative; background: #fff; border-radius: var(--radius-lg); padding: 36px 28px; text-align: center; border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); }
.lp-step-num { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); width: 38px; height: 38px; background: var(--primary-dark); color: var(--primary-yellow); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1rem; }
.lp-step-icon { width: 60px; height: 60px; margin: 0 auto 18px; border-radius: 18px; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; }
.lp-step-icon.blue { background: rgba(45,108,223,0.12); color: var(--primary-blue); }
.lp-step-icon.yellow { background: rgba(244,185,66,0.15); color: var(--primary-gold); }
.lp-step-icon.sky { background: rgba(78,205,196,0.12); color: var(--primary-sky); }
.lp-step h4 { font-weight: 600; color: var(--primary-dark); margin-bottom: 10px; font-size: 1.02rem; }
.lp-step p { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.7; margin: 0; }

/* FILTER + EMPTY */
.lp-filter-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 40px; }
.lp-filter-chip { padding: 8px 20px; border-radius: 30px; background: #fff; border: 1px solid var(--border-color); color: var(--text-secondary); font-weight: 600; font-size: 0.88rem; text-decoration: none; transition: all 0.2s; }
.lp-filter-chip:hover { border-color: var(--primary-yellow); color: var(--primary-dark); text-decoration: none; }
.lp-filter-chip.active { background: linear-gradient(135deg, var(--primary-yellow), var(--primary-gold)); color: var(--primary-dark); border-color: transparent; }

/* SEARCH BAR (หน้าประกาศทั้งหมด) */
.lp-search-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; margin: -16px 0 40px; }
.lp-search-field { position: relative; display: flex; align-items: center; min-width: 0; }
.lp-search-field i { position: absolute; left: 14px; color: var(--text-secondary); font-size: 0.95rem; pointer-events: none; }
.lp-search-field input {
    width: 100%;
    height: 46px;
    padding: 0 14px 0 40px;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    background: #fff;
    color: var(--primary-dark);
    font-family: inherit;
    font-size: 16px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.lp-search-field input:focus { border-color: var(--primary-yellow); box-shadow: 0 0 0 3px rgba(244,185,66,0.22); }
.lp-search-field-keyword { flex: 1 1 320px; max-width: 420px; }
.lp-search-field-province { flex: 0 1 170px; }
.lp-search-select {
    height: 46px;
    padding: 0 34px 0 14px;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    background: #fff;
    color: var(--primary-dark);
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}
.lp-search-select:focus { border-color: var(--primary-yellow); box-shadow: 0 0 0 3px rgba(244,185,66,0.22); }
.lp-search-btn {
    height: 46px;
    padding: 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-blue), #3d7ae8);
    color: #fff;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(45,108,223,0.25);
    transition: transform .2s, box-shadow .2s;
}
.lp-search-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(45,108,223,0.35); }
.lp-clear-btn {
    height: 46px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 12px;
    border: 1.5px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
}
.lp-clear-btn:hover { border-color: var(--primary-yellow); color: var(--primary-dark); text-decoration: none; }

/* Province autocomplete dropdown */
.lp-autocomplete {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 30;
    max-height: 240px;
    overflow-y: auto;
    background: #fff;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(15,18,37,0.14);
}
.lp-autocomplete[hidden] { display: none; }
.lp-autocomplete-item {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 0;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    color: var(--primary-dark);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}
.lp-autocomplete-item:last-child { border-bottom: 0; }
.lp-autocomplete-item:hover,
.lp-autocomplete-item.active { background: rgba(244,185,66,0.16); }

@media (max-width: 767px) {
    .lp-search-bar { margin-top: 0; }
    .lp-search-field-keyword,
    .lp-search-field-province { flex: 1 1 100%; max-width: none; }
    .lp-search-select, .lp-search-btn, .lp-clear-btn { flex: 1 1 calc(50% - 5px); }
}
.lp-empty { text-align: center; padding: 80px 20px; }
.lp-empty i { font-size: 3.4rem; color: var(--border-color); margin-bottom: 16px; }
.lp-empty h4 { color: var(--text-secondary); font-weight: 600; margin-bottom: 8px; }
.lp-empty p { color: var(--text-secondary); font-size: 0.92rem; }

/* BREADCRUMB */
.lp-breadcrumb { display: flex; align-items: center; gap: 10px; color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 32px; flex-wrap: wrap; }
.lp-breadcrumb a { color: var(--primary-blue); text-decoration: none; font-weight: 500; }
.lp-breadcrumb a:hover { color: var(--primary-yellow); text-decoration: none; }
.lp-breadcrumb i { font-size: 0.7rem; }

/* ARTICLE SINGLE */
.lp-article-single { padding: 120px 0 0; }
.lp-article-single-head { max-width: 820px; margin: 0 auto 28px; }
.lp-article-single-head h1 { font-weight: 700; color: var(--primary-dark); font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin: 14px 0; line-height: 1.4; }
.lp-article-single .lp-article-cat { position: static; display: inline-block; margin-top: 0; }
.lp-article-single-cover { max-width: 900px; margin: 0 auto 40px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.lp-article-single-cover img { width: 100%; display: block; }
.lp-article-single-body { max-width: 820px; margin: 0 auto 80px; }
.lp-article-lead { font-size: 1.15rem; color: #2c3547; font-weight: 500; line-height: 1.8; margin-bottom: 28px; }
.lp-article-content { color: #374050; font-size: 1.02rem; line-height: 2; }
.lp-article-content h1, .lp-article-content h2, .lp-article-content h3 { color: var(--primary-dark); font-weight: 700; margin: 28px 0 14px; }
.lp-article-content p { margin-bottom: 18px; }
.lp-article-content ul, .lp-article-content ol { padding-left: 24px; margin-bottom: 18px; }
.lp-article-content img { max-width: 100%; border-radius: 12px; margin: 12px 0; }
.lp-article-content blockquote { background: var(--light-bg); padding: 14px 20px; border-radius: 10px; color: var(--text-secondary); margin: 18px 0; }

/* TOPIC SINGLE */
.lp-topic-single { padding-top: 8px; }
.lp-topic-single-grid { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
.lp-gallery-grid { display: grid; gap: 6px; border-radius: var(--radius-lg); overflow: hidden; background: #eef1f6; }
.lp-gallery-tile { position: relative; display: block; overflow: hidden; background: #dfe4ec; }
.lp-gallery-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s ease; }
.lp-gallery-tile:hover img { transform: scale(1.04); }
.lp-gallery-tile:focus-visible { outline: 3px solid var(--primary-yellow); outline-offset: -3px; }
.gallery-count-4 { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 190px; }
.gallery-count-4 .lp-gallery-tile:first-child { grid-column: span 2; grid-row: span 2; }
.gallery-count-4 .lp-gallery-tile:nth-child(2) { grid-column: span 2; }
.gallery-count-3 { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 220px; }
.gallery-count-2 { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 260px; }
.lp-gallery-tile.is-slideshow > img { display: none; }
.lp-gallery-slides { position: absolute; inset: 0; display: flex; width: 100%; height: 100%; transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1); will-change: transform; }
.lp-gallery-slide { flex: 0 0 100%; width: 100%; height: 100%; }
.lp-gallery-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lp-gallery-tile.is-slideshow:hover .lp-gallery-slide img { transform: none; }
.lp-gallery-more { position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: baseline; gap: 3px; padding: 4px 10px; border-radius: 999px; color: #fff; background: rgba(17,24,39,0.72); font-weight: 700; line-height: 1; pointer-events: none; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); transition: background 0.2s ease; }
.lp-gallery-tile.has-more:hover .lp-gallery-more { background: rgba(17,24,39,0.86); }
.lp-gallery-more strong { font-size: 1.15rem; line-height: 1; }
.lp-gallery-more small { font-size: 0.68rem; font-weight: 500; opacity: 0.9; }
.lp-gallery-hint { color: var(--text-secondary); font-size: 0.82rem; margin: 10px 0 0; display: flex; align-items: center; gap: 6px; }
.lp-gallery-hint i { color: var(--primary-yellow); }
body.lp-lightbox-open { overflow: hidden; }
.lp-lightbox { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.lp-lightbox[hidden] { display: none; }
.lp-lightbox-backdrop { position: absolute; inset: 0; background: rgba(8,12,20,0.92); }
.lp-lightbox-figure { position: relative; z-index: 2; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: min(1100px, 92vw); max-height: 86vh; }
.lp-lightbox-figure img { max-width: 100%; max-height: calc(86vh - 34px); object-fit: contain; border-radius: 10px; background: #111; box-shadow: 0 20px 60px rgba(0,0,0,0.5); opacity: 0; transition: opacity 0.2s ease; }
.lp-lightbox-figure img.is-loaded { opacity: 1; }
.lp-lightbox-counter { color: rgba(255,255,255,0.85); font-size: 0.9rem; font-weight: 500; letter-spacing: 0.5px; }
.lp-lightbox-btn { position: absolute; z-index: 3; width: 46px; height: 46px; border: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.12); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; transition: background 0.2s ease, transform 0.2s ease; }
.lp-lightbox-btn:hover { background: rgba(255,255,255,0.24); }
.lp-lightbox-btn:focus-visible { outline: 2px solid var(--primary-yellow); outline-offset: 2px; }
.lp-lightbox-close { top: 18px; right: 18px; }
.lp-lightbox-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lp-lightbox-next { right: 18px; top: 50%; transform: translateY(-50%); }
.lp-lightbox-prev:hover, .lp-lightbox-next:hover { transform: translateY(-50%) scale(1.05); }
@media (max-width: 767.98px) {
    .gallery-count-4 { grid-template-columns: repeat(2, 1fr); grid-template-rows: 170px 130px 110px; }
    .gallery-count-4 .lp-gallery-tile:first-child { grid-column: span 2; grid-row: span 1; }
    .gallery-count-4 .lp-gallery-tile:nth-child(2) { grid-column: span 2; }
    .gallery-count-3 { grid-template-columns: repeat(2, 1fr); grid-template-rows: 160px 120px; }
    .gallery-count-3 .lp-gallery-tile:first-child { grid-column: span 2; }
    .gallery-count-2 { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; }
}
@media (max-width: 575.98px) {
    .lp-lightbox { padding: 12px; }
    .lp-lightbox-btn { width: 40px; height: 40px; font-size: 1.4rem; }
    .lp-lightbox-prev { left: 8px; }
    .lp-lightbox-next { right: 8px; }
    .lp-lightbox-close { top: 10px; right: 10px; }
    .lp-lightbox-figure { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .lp-gallery-tile img, .lp-gallery-slides, .lp-lightbox-figure img, .lp-lightbox-btn { transition: none; }
}
.lp-topic-single-ph { aspect-ratio: 16 / 10; border-radius: var(--radius-lg); overflow: hidden; background: #f2f4f8; display: flex; align-items: center; justify-content: center; }
.lp-topic-single-ph img { width: 100%; height: 100%; object-fit: cover; }
.lp-topic-single-ph i { font-size: 4rem; color: #c6ced8; }
.lp-topic-detail { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); padding: 32px; margin-top: 28px; }
.lp-topic-detail h2 { font-weight: 700; color: var(--primary-dark); font-size: 1.5rem; margin-bottom: 14px; }
.lp-topic-detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.lp-topic-status-lg { background: rgba(78,205,196,0.14); color: #1a9e8f; font-weight: 600; font-size: 0.82rem; padding: 5px 14px; border-radius: 20px; }
.lp-tag { background: var(--light-bg); border: 1px solid var(--border-color); color: var(--text-secondary); font-size: 0.82rem; padding: 5px 14px; border-radius: 20px; display: inline-flex; align-items: center; gap: 6px; }
.lp-tag i { color: var(--primary-yellow); }
.lp-topic-detail-price { font-size: 1.9rem; font-weight: 700; color: #d63031; margin-bottom: 22px; }
.lp-topic-detail-desc h5 { font-weight: 600; color: var(--primary-dark); font-size: 1.02rem; margin-bottom: 10px; }
.lp-topic-detail-desc h5 i { color: var(--primary-yellow); }
.lp-topic-detail-desc p { color: #44506a; line-height: 1.9; font-size: 0.98rem; }
.lp-topic-detail-addr { margin-top: 18px; background: var(--light-bg); border-radius: 10px; padding: 12px 16px; color: var(--text-secondary); font-size: 0.9rem; }
.lp-topic-detail-addr i { color: var(--primary-blue); margin-right: 6px; }
.lp-topic-map { margin-top: 24px; }
.lp-topic-map h5 { font-weight: 600; color: var(--primary-dark); font-size: 1.02rem; margin-bottom: 12px; }
.lp-topic-map h5 i { color: var(--primary-yellow); margin-right: 4px; }
.lp-topic-map-frame { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--border-color); background: #eef1f6; aspect-ratio: 16 / 9; }
.lp-topic-map-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.lp-topic-map-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: 0.82rem; color: var(--text-secondary); }
.lp-topic-map-foot i { margin-right: 4px; }
.lp-map-approx i { color: var(--primary-yellow); }
.lp-map-exact i { color: #1a9e8f; }
.lp-map-address i { color: var(--primary-blue); }
.lp-map-open { color: var(--primary-blue); font-weight: 600; text-decoration: none; }
.lp-map-open:hover { text-decoration: underline; }
@media (max-width: 575.98px) {
    .lp-topic-map-frame { aspect-ratio: 4 / 3; }
}
.map-coords-preview { margin-top: 10px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border-color); background: #eef1f6; aspect-ratio: 16 / 9; }
.map-coords-preview iframe { display: block; width: 100%; height: 100%; border: 0; }
.lp-contact-card { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); padding: 24px; margin-bottom: 24px; position: sticky; top: 90px; }
.lp-contact-card h5 { font-weight: 700; color: var(--primary-dark); font-size: 1rem; margin-bottom: 18px; }
.lp-contact-card h5 i { color: var(--primary-yellow); margin-right: 4px; }
.lp-contact-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--border-color); }
.lp-contact-row:last-of-type { border-bottom: none; }
.lp-contact-row > i { color: var(--primary-blue); font-size: 1.1rem; margin-top: 2px; }
.lp-contact-row small { display: block; color: var(--text-secondary); font-size: 0.72rem; }
.lp-contact-row strong { color: var(--primary-dark); font-size: 0.9rem; font-weight: 600; word-break: break-all; }
.lp-related-item { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border-color); text-decoration: none; }
.lp-related-item:last-child { border-bottom: none; }
.lp-related-item:hover { text-decoration: none; }
.lp-related-item img, .lp-related-ph { width: 56px; height: 46px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.lp-related-ph { background: var(--light-bg); display: flex; align-items: center; justify-content: center; color: #c6ced8; }
.lp-related-title { font-weight: 500; color: var(--primary-dark); font-size: 0.85rem; line-height: 1.4; }
.lp-related-price { color: #d63031; font-weight: 600; font-size: 0.8rem; }

/* FOOTER */
.public-footer { background: var(--primary-darker); color: rgba(255,255,255,0.7); }
.public-footer-top { max-width: 1200px; margin: 0 auto; padding: 64px 24px 40px; }
.public-footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; }
.public-footer-col h5 { color: #fff; font-weight: 700; margin-top: 14px; }
.footer-brand-lockup { display: flex; align-items: center; gap: 12px; }
.public-footer-brand .footer-brand-lockup .brand-mark { width: 44px; height: 44px; }
.public-footer-brand .footer-brand-lockup h5 { margin: 0; }
.public-footer-col h6 { color: var(--primary-yellow); font-weight: 600; font-size: 0.95rem; margin-bottom: 18px; letter-spacing: 1px; }
.public-footer-col p { font-size: 0.9rem; line-height: 1.8; margin-bottom: 10px; }
.public-footer-col a { display: block; color: rgba(255,255,255,0.72); text-decoration: none; font-size: 0.9rem; padding: 5px 0; transition: color 0.2s; }
.public-footer-col a:hover { color: var(--primary-yellow); text-decoration: none; }
.public-footer-mail { color: rgba(255,255,255,0.85); }
.public-footer-social { display: flex; gap: 10px; margin-top: 16px; }
.public-footer-social a { width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; padding: 0; }
.public-footer-social a:hover { background: rgba(244,185,66,0.15); }
.public-footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); }
.public-footer-bottom p { max-width: 1200px; margin: 0 auto; padding: 0 24px 20px; font-size: 0.82rem; color: rgba(255,255,255,0.68); text-align: center; }
.public-footer-legal { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 22px; max-width: 1200px; margin: 0 auto; padding: 16px 24px 8px; }
.public-footer-legal a { color: rgba(255,255,255,0.78); font-size: 0.82rem; text-decoration: none; }
.public-footer-legal a:hover { color: var(--primary-yellow); text-decoration: none; }

/* RESPONSIVE LANDING */
@media (max-width: 992px) {
    .lp-benefit-grid { grid-template-columns: repeat(2, 1fr); }
    .lp-steps { grid-template-columns: 1fr; }
    .lp-topic-single-grid { grid-template-columns: 1fr; }
    .lp-contact-card { position: static; }
    .lp-layout-middle { grid-template-columns: 1fr; }
    .public-nav-links {
        position: fixed; top: 74px; left: 0; right: 0; background: var(--primary-dark);
        flex-direction: column; align-items: flex-start; padding: 16px 24px 24px;
        display: none; box-shadow: 0 8px 24px rgba(0,0,0,0.3); border-top: 1px solid rgba(255,255,255,0.08);
    }
    .public-nav-links.show { display: flex; }
    .public-nav-links > a { width: 100%; }
    .public-nav-actions { margin-left: 0; width: 100%; flex-direction: column; align-items: stretch; margin-top: 8px; }
    .public-nav-toggle { display: block; }
    .public-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .lp-benefits, .lp-ads-bg, .lp-featured-ads { background-attachment: scroll; }
}
@media (max-width: 576px) {
    .lp-hero-content h1 { font-size: 1.9rem; }
    .lp-hero-stats { gap: 28px; }
    .lp-benefit-grid { grid-template-columns: 1fr; }
    .lp-topic-grid, .lp-article-grid { grid-template-columns: 1fr; }
    .lp-price-grid { grid-template-columns: 1fr; }
    .lp-cta-inner { flex-direction: column; text-align: center; }
    .lp-cta-actions { justify-content: center; }
    .public-footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .lp-section { padding: 60px 0; }
}

/* ========= ADMIN SPONSORS UI ========= */
.badge-custom.pending { background: rgba(244,185,66,0.16); color: #b8860b; }

.sp-step-label {
    display: flex; align-items: center; gap: 10px;
    font-weight: 700; color: var(--primary-dark); font-size: 0.95rem;
    margin: 22px 0 14px; padding-bottom: 10px; border-bottom: 2px solid var(--border-color);
}
.sp-step-label:first-child { margin-top: 0; }
.sp-step-num {
    width: 26px; height: 26px; border-radius: 8px; background: var(--primary-blue); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; flex-shrink: 0;
}

.sp-dropdown {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 1050;
    background: #fff; border: 1px solid var(--border-color); border-radius: 12px;
    box-shadow: 0 10px 30px rgba(15,18,37,0.15); max-height: 280px; overflow-y: auto;
    display: none; margin-top: 4px; padding: 6px;
}
.sp-topic-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; }
.sp-topic-item:hover { background: var(--light-bg); border-color: var(--border-color); }
.sp-topic-item img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.sp-topic-item-ph { width: 40px; height: 40px; border-radius: 8px; background: #f0f0f0; display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 1rem; flex-shrink: 0; }
.sp-topic-item .sp-ti-title { font-weight: 500; font-size: 0.87rem; color: var(--primary-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-topic-item .sp-ti-meta { font-size: 0.75rem; color: var(--text-secondary); }
.sp-dropdown-empty { padding: 14px; text-align: center; color: var(--text-secondary); font-size: 0.85rem; }

.sp-topic-selected {
    display: flex; align-items: center; gap: 12px;
    background: rgba(45,108,223,0.06); border: 1px dashed var(--primary-blue); border-radius: 12px;
    padding: 10px 12px; margin-top: 10px;
}
.sp-topic-selected img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.sp-topic-selected-ph { width: 46px; height: 46px; border-radius: 8px; background: #eef1f6; display: flex; align-items: center; justify-content: center; color: #b9c1cc; font-size: 1.2rem; flex-shrink: 0; }
.sp-topic-selected .sp-sel-title { font-weight: 600; color: var(--primary-dark); font-size: 0.92rem; line-height: 1.3; }
.sp-topic-selected .sp-sel-meta { font-size: 0.78rem; color: var(--text-secondary); }

.sp-preview { margin-top: 22px; background: var(--light-bg); border: 1px solid var(--border-color); border-radius: 14px; padding: 16px; }
.sp-preview-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-secondary); font-weight: 600; margin-bottom: 10px; }
.sp-preview-card { display: flex; gap: 14px; background: #fff; border-radius: 12px; border: 1px solid var(--border-color); padding: 12px; box-shadow: var(--shadow-sm); }
.sp-preview-card .sp-prev-img { width: 88px; height: 70px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.sp-preview-card .sp-prev-ph { width: 88px; height: 70px; border-radius: 8px; background: linear-gradient(135deg,#eef1f6,#e2e7ef); display: flex; align-items: center; justify-content: center; color: #b9c1cc; font-size: 1.4rem; flex-shrink: 0; }
.sp-preview-title { font-weight: 600; color: var(--primary-dark); font-size: 0.92rem; line-height: 1.3; }
.sp-preview-meta { font-size: 0.78rem; color: var(--text-secondary); display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; }
.sp-preview-empty { font-size: 0.85rem; color: var(--text-secondary); background: #fff; border-radius: 12px; border: 1px dashed var(--border-color); padding: 18px; text-align: center; }

.sp-filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 24px; border-bottom: 1px solid var(--border-color); background: var(--light-bg); }
.sp-filter-bar .form-control { padding: 8px 12px; font-size: 0.85rem; width: auto; }

.sp-progress { height: 6px; border-radius: 20px; background: #eef1f6; overflow: hidden; width: 110px; }
.sp-progress > div { height: 100%; border-radius: 20px; }
.sp-progress.ok > div { background: var(--primary-sky); }
.sp-progress.warn > div { background: var(--primary-yellow); }
.sp-progress.done > div { background: #ff6b6b; }
.sp-days { font-size: 0.75rem; color: var(--text-secondary); margin-top: 4px; }

.sp-btn-change { background: none; border: none; color: var(--primary-blue); font-size: 0.82rem; font-weight: 600; padding: 4px 8px; flex-shrink: 0; }
.sp-btn-change:hover { text-decoration: underline; }

/* ========= SPONSORS PAGE COMPACT TYPE ========= */
.sponsors-admin .form-group label { font-size: 0.78rem; font-weight: 500; }
.sponsors-admin .form-control { font-size: 0.85rem; font-weight: 400; padding: 9px 12px; }
.sponsors-admin h3 { font-size: 1.25rem; }
.sponsors-admin h5 { font-size: 0.95rem; }
.sponsors-admin .alert { font-size: 0.85rem; }
.sponsors-admin .sp-form-card { padding: 20px; overflow: visible; }
.sponsors-admin .table-header h5 { font-size: 0.95rem; }
.sponsors-admin .table-custom thead th { font-size: 0.7rem; padding: 10px 16px; }
.sponsors-admin .table-custom tbody td { font-size: 0.8rem; padding: 10px 16px; }
.sponsors-admin .user-cell .user-name { font-size: 0.84rem; font-weight: 500; }
.sponsors-admin .user-cell .user-email { font-size: 0.7rem; }
.sponsors-admin .badge-custom { font-size: 0.66rem; padding: 3px 10px; }
.sponsors-admin .sp-filter-bar { padding: 10px 16px; }
.sponsors-admin .sp-filter-bar .form-control { font-size: 0.78rem; padding: 6px 10px; }
.sponsors-admin .sp-step-label { font-size: 0.85rem; margin: 16px 0 10px; padding-bottom: 8px; }
.sponsors-admin .sp-step-num { width: 22px; height: 22px; font-size: 0.72rem; }
.sponsors-admin .sp-topic-item .sp-ti-title { font-size: 0.8rem; }
.sponsors-admin .sp-topic-item .sp-ti-meta { font-size: 0.68rem; }
.sponsors-admin .sp-sel-title { font-size: 0.84rem; }
.sponsors-admin .sp-sel-meta { font-size: 0.7rem; }
.sponsors-admin .sp-preview-title { font-size: 0.84rem; }
.sponsors-admin .sp-preview-meta { font-size: 0.7rem; }
.sponsors-admin .sp-preview-label { font-size: 0.68rem; }
.sponsors-admin .sp-days { font-size: 0.68rem; }
.sponsors-admin .table-scroll { overflow-x: auto; }
.sponsors-admin .table-scroll th.sp-sticky,
.sponsors-admin .table-scroll td.sp-sticky {
    position: sticky; right: 0;
    background: #fff;
    box-shadow: -6px 0 10px rgba(15,18,37,0.06);
}
.sponsors-admin .table-scroll thead th.sp-sticky { background: var(--light-bg); z-index: 1; }
.sponsors-admin .table-scroll tbody tr:hover td.sp-sticky { background: #fff; }

/* ========= SHARED BADGES ========= */
.badge-custom.warning { background: rgba(244,185,66,0.16); color: #9c6f08; }
.badge-custom.info    { background: rgba(45,108,223,0.12); color: #1d5fc2; }
.badge-custom.purple  { background: rgba(109,67,216,0.12); color: #6d43d8; }

/* ========= ALERT CLOSE BUTTON ========= */
.alert-custom {
    position: relative;
}
.alert-custom .alert-close {
    margin-left: auto;
    border: none;
    background: none;
    color: inherit;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.6;
    padding: 4px 8px;
    min-width: 32px;
    min-height: 32px;
    flex-shrink: 0;
}
.alert-custom .alert-close:hover { opacity: 1; }

/* ========= MOBILE ADAPT ========= */
@media (max-width: 767px) {
    /* Prevent iOS auto-zoom on focus */
    input.form-control,
    select.form-control,
    textarea.form-control,
    .mt-search input,
    .mt-filter-bar select,
    input[type="text"], input[type="email"],
    input[type="tel"], input[type="number"],
    input[type="password"], input[type="date"] {
        font-size: 16px;
    }
    /* Comfortable touch targets for nav + filters */
    .public-nav-toggle { padding: 10px 12px; min-width: 44px; min-height: 44px; }
    .public-nav-links a { display: block; padding: 12px 0; }
}

.cookie-consent {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 10000;
    width: min(420px, calc(100vw - 40px));
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px;
    padding: 18px 20px 16px;
    text-align: left;
    background: linear-gradient(180deg, #fffdf8 0%, #fff 48%);
    border: 1px solid rgba(27, 31, 59, 0.08);
    border-top: 4px solid var(--primary-yellow);
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(27, 31, 59, 0.18);
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.cookie-consent[hidden] { display: none; }
.cookie-consent.is-visible { opacity: 1; transform: translateY(0); }
.cookie-consent.is-closing { opacity: 0; transform: translateY(12px); }
.cookie-consent-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(244, 185, 66, 0.16);
    color: #9c6f08;
    font-size: 1.25rem;
}
.cookie-consent-content { min-width: 0; }
.cookie-consent-title {
    margin: 1px 0 4px;
    color: var(--primary-dark);
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.35;
}
.cookie-consent-text {
    margin: 0;
    color: #5c627a;
    font-size: 0.84rem;
    line-height: 1.62;
}
.cookie-consent-link {
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.cookie-consent-link:hover { color: var(--primary-dark); }
.cookie-consent-accept {
    margin-top: 13px;
    min-height: 42px;
    padding: 9px 22px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-yellow), var(--primary-gold));
    color: var(--primary-dark);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 5px 14px rgba(212, 168, 67, 0.3);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.cookie-consent-accept:hover {
    transform: translateY(-1px);
    box-shadow: 0 7px 18px rgba(212, 168, 67, 0.36);
    filter: brightness(1.03);
}
.cookie-consent-accept:active { transform: translateY(0); }
.cookie-consent-accept:focus-visible {
    outline: 3px solid rgba(45, 108, 223, 0.32);
    outline-offset: 2px;
}
@media (max-width: 767.98px) {
    .cookie-consent {
        left: 12px;
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        width: auto;
        padding: 16px;
        border-radius: 14px;
    }
    .cookie-consent-accept { width: 100%; }
    body.cookie-consent-visible .site-toast-stack {
        bottom: calc(24px + env(safe-area-inset-bottom, 0px) + var(--cookie-consent-offset, 0px));
    }
}
@media (prefers-reduced-motion: reduce) {
    .cookie-consent,
    .cookie-consent-accept { transition: none; }
}

/* ========= LEGAL PAGES ========= */
.legal-hero { padding-bottom: 54px; }
.legal-section { background: #fff; }
.legal-layout {
    display: grid;
    grid-template-columns: 272px minmax(0, 1fr);
    gap: 48px;
    align-items: start;
}
.legal-toc {
    position: sticky;
    top: 92px;
    padding: 22px 20px;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}
.legal-toc-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    color: var(--primary-dark);
    font-size: 0.92rem;
    font-weight: 700;
}
.legal-toc-title i { color: var(--primary-yellow); }
.legal-toc nav { display: flex; flex-direction: column; gap: 2px; }
.legal-toc nav a {
    display: block;
    padding: 7px 10px;
    border-radius: 8px;
    color: #5c627a;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.45;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease;
}
.legal-toc nav a:hover,
.legal-toc nav a:focus-visible {
    background: rgba(244, 185, 66, 0.14);
    color: var(--primary-dark);
    text-decoration: none;
}
.legal-meta-card {
    display: grid;
    gap: 5px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    color: #7b8198;
    font-size: 0.76rem;
    line-height: 1.55;
}
.legal-meta-card strong { color: var(--primary-dark); }
.legal-content {
    min-width: 0;
    color: #3c4356;
    font-size: 1rem;
    line-height: 1.9;
}
.legal-content section { scroll-margin-top: 96px; }
.legal-content h2 {
    margin: 44px 0 16px;
    color: var(--primary-dark);
    font-size: 1.38rem;
    font-weight: 700;
    line-height: 1.45;
}
.legal-content section:first-of-type h2 { margin-top: 0; }
.legal-content h3 {
    margin: 26px 0 10px;
    color: var(--primary-dark);
    font-size: 1.08rem;
    font-weight: 700;
}
.legal-content p { margin-bottom: 15px; }
.legal-content ul,
.legal-content ol { padding-left: 22px; margin-bottom: 18px; }
.legal-content li { margin-bottom: 9px; }
.legal-content li::marker { color: var(--primary-yellow); }
.legal-content a { color: var(--primary-blue); font-weight: 600; text-decoration: none; }
.legal-content a:hover { color: var(--primary-yellow); text-decoration: none; }
.legal-content code {
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(27, 31, 59, 0.06);
    color: var(--primary-dark);
    font-size: 0.86em;
    word-break: break-word;
}
.legal-summary {
    margin-bottom: 32px;
    padding: 20px 22px;
    background: linear-gradient(135deg, rgba(244, 185, 66, 0.12), rgba(45, 108, 223, 0.06));
    border: 1px solid rgba(244, 185, 66, 0.28);
    border-left: 4px solid var(--primary-yellow);
    border-radius: 14px;
}
.legal-summary p { margin-bottom: 10px; }
.legal-summary p:last-child { margin-bottom: 0; }
.legal-note {
    margin-top: 20px;
    padding: 14px 16px;
    background: #fff8e6;
    border-left: 3px solid var(--primary-yellow);
    border-radius: 10px;
    color: #6b5a2e;
    font-size: 0.88rem;
    line-height: 1.7;
}
.legal-note i { color: #b8860b; margin-right: 4px; }
.legal-contact-card {
    margin: 18px 0 22px;
    padding: 18px 20px;
    background: #f8f9fc;
    border: 1px solid var(--border-color);
    border-radius: 14px;
}
.legal-contact-card p {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 10px;
    line-height: 1.6;
}
.legal-contact-card p:last-child { margin-bottom: 0; }
.legal-contact-card i {
    flex: 0 0 auto;
    margin-top: 0.22em;
    color: var(--primary-blue);
}
.legal-table-wrap {
    margin: 18px 0 24px;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    -webkit-overflow-scrolling: touch;
}
.legal-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    font-size: 0.9rem;
    line-height: 1.65;
}
.legal-table th {
    padding: 12px 14px;
    background: var(--primary-dark);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: left;
    vertical-align: top;
}
.legal-table td {
    padding: 12px 14px;
    border-top: 1px solid var(--border-color);
    color: #4a5065;
    vertical-align: top;
}
.legal-table tbody tr:nth-child(even) td { background: #fafbfe; }
.legal-table td:first-child { color: var(--primary-dark); font-weight: 600; }

@media (max-width: 991.98px) {
    .legal-layout { grid-template-columns: 1fr; gap: 30px; }
    .legal-toc { position: static; }
    .legal-toc nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 14px;
    }
}
@media (max-width: 575.98px) {
    .legal-hero { padding-bottom: 42px; }
    .legal-toc { padding: 17px 15px; }
    .legal-toc nav { grid-template-columns: 1fr; }
    .legal-content { font-size: 0.96rem; line-height: 1.85; }
    .legal-content h2 { margin-top: 36px; font-size: 1.2rem; }
    .legal-table { min-width: 560px; font-size: 0.84rem; }
    .legal-table th,
    .legal-table td { padding: 10px 12px; }
    .legal-summary { padding: 17px 16px; }
    .legal-contact-card { padding: 16px; }
}

/* ========= BACK TO TOP ========= */
.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 950;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    background: rgba(15, 18, 37, 0.35);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    box-shadow: 0 6px 20px rgba(15, 18, 37, 0.18);
    transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease, visibility 0.25s;
}
.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    background: rgba(15, 18, 37, 0.6);
    border-color: rgba(244, 185, 66, 0.7);
    color: var(--primary-yellow);
}
.back-to-top:active { transform: translateY(0) scale(0.96); }
.back-to-top:focus-visible {
    outline: 3px solid rgba(45, 108, 223, 0.45);
    outline-offset: 3px;
}
@media (max-width: 575.98px) {
    .back-to-top {
        right: 16px;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        width: 44px;
        height: 44px;
    }
    body.cookie-consent-visible .back-to-top {
        bottom: calc(16px + env(safe-area-inset-bottom, 0px) + var(--cookie-consent-offset, 0px));
    }
}
@media (prefers-reduced-motion: reduce) {
    .back-to-top { transition: none; }
}

/* ========= CHAT WIDGET (landing) ========= */
.chat-widget {
    position: fixed;
    right: 20px;
    bottom: 80px;
    z-index: 950;
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(45, 108, 223, 0.45);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 1.35rem;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(45, 108, 223, 0.35);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.chat-widget:hover {
    transform: translateY(-2px) scale(1.04);
    background: rgba(45, 108, 223, 0.7);
    border-color: rgba(244, 185, 66, 0.7);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 10px 28px rgba(45, 108, 223, 0.45);
}
.chat-widget:focus-visible {
    outline: 3px solid rgba(45, 108, 223, 0.45);
    outline-offset: 3px;
}
.chat-widget-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #e05a4f;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.lp-contact-dm { background: #f0f4ff; border-color: #d8e2fb; color: #1B1F3B; }
.lp-contact-dm .lp-contact-icon { background: var(--primary-blue); }
.lp-contact-dm:hover .lp-contact-arrow { color: var(--primary-blue); }

/* ========= INBOX / CHAT ========= */
.inbox-layout { display: grid; grid-template-columns: 340px 1fr; gap: 16px; min-height: 60vh; }
.inbox-sidebar, .inbox-main { background: #fff; border-radius: 16px; border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); overflow: hidden; }
.inbox-sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--border-color); }
.inbox-sidebar-head h5 { margin: 0; font-weight: 700; color: var(--primary-dark); }
.inbox-thread-list { max-height: 62vh; overflow-y: auto; }
.inbox-thread-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; text-decoration: none; color: inherit; border-bottom: 1px solid #f3f5f9; transition: background 0.15s ease; }
.inbox-thread-item:hover { background: #f8f9fc; text-decoration: none; color: inherit; }
.inbox-thread-item.active { background: rgba(45,108,223,0.08); }
.inbox-thread-avatar { width: 40px; height: 40px; border-radius: 50%; background: rgba(45,108,223,0.1); color: var(--primary-blue); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.inbox-thread-body { flex: 1; min-width: 0; }
.inbox-thread-title { font-weight: 600; color: var(--primary-dark); font-size: 0.95rem; }
.inbox-thread-preview { color: var(--text-secondary); font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-thread-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.inbox-thread-meta small { color: var(--text-secondary); font-size: 0.72rem; }
.inbox-unread-badge { background: #e05a4f; color: #fff; font-size: 0.7rem; font-weight: 700; padding: 2px 7px; border-radius: 10px; }
.inbox-empty-small { text-align: center; padding: 40px 16px; color: var(--text-secondary); }
.inbox-empty-small i { font-size: 2rem; opacity: 0.5; }
.inbox-chat-head { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--border-color); }
.inbox-chat-title strong { display: block; color: var(--primary-dark); }
.inbox-chat-title small { color: var(--text-secondary); font-size: 0.8rem; }
.inbox-back-link { color: var(--text-secondary); font-size: 1.2rem; }
.inbox-messages { height: 52vh; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: #f8f9fc; }
.inbox-msg { display: flex; flex-direction: column; max-width: 78%; }
.inbox-msg.own { align-self: flex-end; align-items: flex-end; }
.inbox-bubble { padding: 10px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--border-color); font-size: 0.95rem; line-height: 1.5; word-break: break-word; }
.inbox-msg.own .inbox-bubble { background: var(--primary-blue); color: #fff; border-color: var(--primary-blue); }
.inbox-msg-time { font-size: 0.7rem; color: var(--text-secondary); margin-top: 2px; }
.inbox-read-status { color: var(--primary-blue); font-weight: 600; }
.inbox-composer { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border-color); background: #fff; }
.inbox-composer textarea { flex: 1; resize: none; border: 1px solid var(--border-color); border-radius: 10px; padding: 10px 12px; font-family: 'Kanit'; font-size: 0.95rem; max-height: 120px; }
.inbox-send-btn { align-self: flex-end; }
.inbox-empty-main { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 60vh; color: var(--text-secondary); text-align: center; }
.inbox-empty-main i { font-size: 3rem; opacity: 0.4; margin-bottom: 12px; }
.member-search-results { max-height: 220px; overflow-y: auto; }
.member-search-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; text-decoration: none; color: inherit; }
.member-search-item:hover { background: #f0f3fa; text-decoration: none; color: inherit; }
.public-nav-badge { background: #e05a4f; color: #fff; font-size: 0.7rem; font-weight: 700; padding: 1px 6px; border-radius: 10px; margin-left: 4px; }
.chat-bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; margin-right: 4px; line-height: 1; vertical-align: middle; }
.chat-bell i { font-size: 1.25rem; line-height: 1; }
.chat-bell-badge { position: absolute; top: -5px; right: -7px; left: auto; transform: none; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #e05a4f; color: #fff; font-size: 0.62rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; border: 2px solid #fff; line-height: 1; z-index: 2; }
.admin-sidebar .chat-bell-badge { border-color: rgba(255,255,255,0.9); }
.admin-sidebar .sidebar-menu .chat-bell i { font-size: 1.25rem; }
.chat-nav-badge { background: #e05a4f; color: #fff; font-size: 0.7rem; font-weight: 700; padding: 1px 6px; border-radius: 10px; margin-left: 4px; }
.admin-sidebar .chat-nav-badge { background: #e05a4f; color: #fff; border: 1px solid rgba(255,255,255,0.35); }
@media (max-width: 991.98px) {
    .inbox-layout { grid-template-columns: 1fr; }
    .inbox-sidebar { max-height: 40vh; }
}

/* ========= ADMIN INBOX REDESIGN ========= */
.admin-page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.admin-page-head h3 { margin: 0; font-weight: 700; color: var(--primary-dark); }
.admin-page-head p { margin: 4px 0 0; color: var(--text-secondary); font-size: 0.9rem; }
.admin-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; background: #fff; border: 1px solid var(--border-color); border-radius: 12px; padding: 12px; box-shadow: var(--shadow-sm); }
.admin-toolbar-search { position: relative; flex: 1 1 220px; min-width: 180px; }
.admin-toolbar-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-secondary); }
.admin-toolbar-search .form-control { padding-left: 36px; border-radius: 10px; }
.admin-toolbar-select { flex: 0 0 150px; border-radius: 10px; }
.inbox-admin { grid-template-columns: 340px 1fr; }
.inbox-thread-count { background: var(--light-bg); color: var(--text-secondary); font-size: 0.75rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.thread-status-pill { font-size: 0.65rem; font-weight: 700; padding: 1px 6px; border-radius: 8px; margin-left: 6px; }
.thread-status-pill.closed { background: #fdecea; color: #c0392b; }
.inbox-thread-item.is-closed { opacity: 0.75; }
.inbox-member-bar { display: flex; flex-wrap: wrap; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border-color); background: #f8f9fc; font-size: 0.82rem; color: var(--text-secondary); }
.inbox-chat-actions { display: flex; gap: 6px; align-items: center; }
.load-older-btn { margin: 0 16px 8px; align-self: center; }
.inbox-details { background: #fff; border-radius: 16px; border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column; }
.inbox-details-head { padding: 16px; border-bottom: 1px solid var(--border-color); }
.inbox-details-head h5 { margin: 0; font-weight: 700; color: var(--primary-dark); }
.inbox-details-body { padding: 16px; overflow-y: auto; max-height: 62vh; }
.detail-block { margin-bottom: 18px; }
.detail-block h6 { font-weight: 700; color: var(--primary-dark); margin-bottom: 8px; font-size: 0.9rem; }
.detail-row { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--border-color); font-size: 0.82rem; }
.detail-row span { color: var(--text-secondary); }
.detail-row strong { color: var(--primary-dark); text-align: right; word-break: break-word; }
.notes-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; max-height: 180px; overflow-y: auto; }
.note-item { background: #f8f9fc; border: 1px solid var(--border-color); border-radius: 10px; padding: 8px 10px; }
.note-meta { font-size: 0.72rem; color: var(--text-secondary); margin-bottom: 4px; }
.note-body { font-size: 0.85rem; color: var(--primary-dark); }
.notes-empty { color: var(--text-secondary); font-size: 0.82rem; font-style: italic; }
.note-form { display: flex; gap: 6px; }
.note-form textarea { flex: 1; resize: none; border: 1px solid var(--border-color); border-radius: 8px; padding: 8px; font-family: 'Kanit'; font-size: 0.85rem; min-height: 60px; }
.composer-meta { display: flex; align-items: center; gap: 10px; }
.composer-meta small { color: var(--text-secondary); font-size: 0.75rem; }
.msg-delete-btn { border: none; background: none; color: #c0392b; cursor: pointer; margin-left: 6px; font-size: 0.8rem; opacity: 0.7; }
.msg-delete-btn:hover { opacity: 1; }

/* mobile admin inbox */
@media (max-width: 991.98px) {
    .inbox-admin { grid-template-columns: 1fr; }
    .inbox-details { display: none; }
    .inbox-admin.mobile-chat-view .inbox-sidebar { display: none; }
    .inbox-admin.mobile-chat-view .inbox-main { display: block; }
    .inbox-admin:not(.mobile-chat-view) .inbox-main { display: none; }
    .inbox-admin:not(.mobile-chat-view) .inbox-sidebar { display: block; max-height: none; }
}
@media (max-width: 767.98px) {
    .admin-toolbar { flex-direction: column; align-items: stretch; }
    .admin-toolbar-select { flex: 1 1 auto; }
    .inbox-member-bar { font-size: 0.75rem; }
}

/* ========= ADMIN CHAT WINDOW (like user) ========= */
.admin-chat-window-wrap { display: block; }
.admin-chat-window { background: #fff; border-radius: 16px; border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column; width: 100%; }
.admin-chat-window .inbox-chat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; border-bottom: 1px solid var(--border-color); }
.admin-chat-window .inbox-chat-title { display: flex; align-items: center; gap: 12px; }
.admin-chat-window .inbox-chat-title strong { display: block; color: var(--primary-dark); font-size: 1.05rem; }
.admin-chat-window .inbox-chat-title small { color: var(--text-secondary); font-size: 0.82rem; }
.admin-chat-window .inbox-back-link { color: var(--text-secondary); font-size: 1.2rem; text-decoration: none; }
.admin-chat-window .inbox-member-bar { display: flex; flex-wrap: wrap; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border-color); background: #f8f9fc; font-size: 0.82rem; color: var(--text-secondary); }
.admin-chat-window .inbox-composer { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border-color); background: #fff; align-items: flex-end; }
.admin-chat-window .inbox-composer textarea { flex: 1; resize: none; border: 1px solid var(--border-color); border-radius: 10px; padding: 10px 12px; font-family: 'Kanit'; font-size: 0.95rem; max-height: 120px; }
.admin-chat-window .load-older-btn { margin: 8px 16px; align-self: center; }
.admin-chat-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; background: #fff; border: 1px solid var(--border-color); border-radius: 12px; padding: 12px; box-shadow: var(--shadow-sm); }
.admin-chat-toolbar .btn { white-space: nowrap; }
.admin-chat-sidecards { display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 1199.98px) {
    .admin-chat-window-wrap { grid-template-columns: 1fr; }
    .admin-chat-sidecards { order: 2; }
}
@media (max-width: 767.98px) {
    .admin-chat-window .inbox-messages { height: 48vh; }
    .admin-chat-window .inbox-chat-actions { flex-wrap: wrap; }
}

@media (max-width: 575.98px) {
    .chat-widget {
        right: 16px;
        bottom: 76px;
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
    body.cookie-consent-visible .chat-widget {
        bottom: calc(76px + env(safe-area-inset-bottom, 0px) + var(--cookie-consent-offset, 0px));
    }
}
@media (prefers-reduced-motion: reduce) {
    .chat-widget { transition: none; }
}
