@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Noto+Sans+Bengali:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette */
    --primary-color: #ff6b00;
    --primary-hover: #e05d00;
    --primary-light: rgba(255, 107, 0, 0.1);
    --secondary-color: #ff3b3b;
    --accent-color: #ff8a00;

    --bg-color: #f4f6f9;
    --white: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    --border-color: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    --site-header-height: 72px;

    /* Shadows & Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(255, 107, 0, 0.3);

    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.2);

    /* Typography */
    --font-main: 'Anek Bangla', 'Outfit', sans-serif;

    /* Layout */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

ul {
    list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

p {
    color: var(--text-muted);
}

/* Layout */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.main-content {
    min-height: calc(100vh - 200px);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: var(--radius-full);
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
    border: none;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.4);
    color: var(--white);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-icon-pop>i {
    display: inline-flex;
    animation: btnIconPop 2.5s ease-in-out infinite;
}

.btn-icon-pop:hover>i {
    animation-play-state: paused;
}

@keyframes btnIconPop {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.18);
    }
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
}

/* Forms */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-main);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Cards */
.card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.02);
    transition: var(--transition);
    min-width: 0;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Glassmorphism utility */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

/* Badges */
.badge {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary-color);
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

header {
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    position: relative;
    z-index: auto;
    transition: var(--transition);
}

header.scrolled {
    box-shadow: var(--shadow-md);
    padding: 10px 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    min-width: 0;
    flex-shrink: 1;
    color: var(--primary-color);
}

.logo-text {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.logo-brand {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 1px;
}

.logo-tagline {
    display: block;
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--text-muted);
    line-height: 1.25;
    letter-spacing: 0;
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logo-img {
    height: 40px;
    width: auto;
    border-radius: 4px;
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
    max-width: fit-content;
}

.btn-app-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    white-space: nowrap;
    line-height: 1;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.btn-app-download:hover {
    background: var(--bg-color);
    color: var(--text-main);
    border-color: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.header-app-download-icon {
    display: block;
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

.header-app-download-desktop {
    display: inline-flex;
    height: 38px;
    min-height: 38px;
    padding: 0 12px;
    gap: 7px;
}

.header-app-download-mobile {
    display: none;
}

.menu-wrapper {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-menu {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-menu a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 1.05rem;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.auth-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
    padding: 5px;
}

/* Footer */
footer {
    background-color: var(--white);
    padding: 60px 0 20px;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-main);
}

.footer-col p {
    margin-bottom: 15px;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
}

.social-links a:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 0.95rem;
}

.footer-bottom p {
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 480px) {
    .footer-bottom {
        font-size: 0.85rem;
    }
    .footer-bottom p {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.5;
    }
}

/* Dashboard Sidebar Layout */
.dashboard-container {
    display: flex;
    min-height: calc(100vh - 80px);
}

.sidebar {
    width: 280px;
    background: var(--white);
    border-right: 1px solid var(--border-color);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
}

.sidebar-profile {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.sidebar-profile img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid var(--white);
    box-shadow: var(--shadow-md);
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    margin-bottom: 5px;
    font-weight: 500;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: var(--primary-light);
    color: var(--primary-color);
}

.sidebar-menu a i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.dashboard-content {
    flex: 1;
    padding: 30px;
    background: var(--bg-color);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.admin-dashboard .table-responsive {
    min-width: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--bg-color);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

tr:hover td {
    background-color: rgba(0, 0, 0, 0.01);
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-primary {
    color: var(--primary-color);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

.text-muted {
    color: var(--text-muted);
}

.font-bold {
    font-weight: 700;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mt-5 {
    margin-top: 3rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.p-4 {
    padding: 1.5rem;
}

.d-flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 1rem;
}

.gap-4 {
    gap: 1.5rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.job-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .job-details-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card {
        margin-bottom: 15px;
    }

    .dashboard-container {
        flex-direction: column;
        overflow-x: hidden;
        max-width: 100vw;
    }

    .sidebar:not(.admin-sidebar) {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 15px;
    }

    .sidebar:not(.admin-sidebar) .sidebar-profile {
        display: none;
    }

    .sidebar:not(.admin-sidebar) .sidebar-menu {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        gap: 10px;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar:not(.admin-sidebar) .sidebar-menu::-webkit-scrollbar {
        height: 4px;
    }

    .sidebar:not(.admin-sidebar) .sidebar-menu::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 4px;
    }

    .sidebar:not(.admin-sidebar) .sidebar-menu a {
        margin-bottom: 0;
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .dashboard-content {
        padding: 15px;
    }

    /* Mobile Header Menu */
    .mobile-menu-btn {
        display: block;
        flex-shrink: 0;
        font-size: 1.85rem;
        padding: 6px 8px;
        margin-left: 4px;
        line-height: 1;
    }

    header .container {
        gap: 8px;
        padding-left: 18px;
        padding-right: 18px;
    }

    header {
        padding: 12px 0;
    }

    .header-left {
        flex: 1;
        min-width: 0;
        max-width: none;
        gap: 6px;
        align-items: center;
    }

    .logo {
        font-size: 1.35rem;
        gap: 7px;
        flex: 0 1 auto;
        min-width: 0;
        max-width: none;
    }

    .logo-text {
        max-width: 50vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .logo-tagline {
        font-size: 0.72rem;
        max-width: 50vw;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        white-space: normal;
        line-height: 1.35;
        margin-top: 1px;
    }

    .logo-img {
        height: 38px;
    }

    .header-app-download-mobile {
        display: inline-flex !important;
        height: 38px;
        min-height: 38px;
        padding: 0 10px;
        gap: 5px;
        flex-shrink: 0;
        margin-left: auto;
    }

    .header-app-download-mobile .header-app-download-icon {
        width: 20px;
        height: 20px;
    }

    .header-app-download-mobile .header-app-download-label {
        display: inline-block;
        font-size: 0.85rem;
    }

    .header-app-download-desktop {
        display: none !important;
    }

    .menu-wrapper {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 20px;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        gap: 20px;
        align-items: stretch;
    }

    .menu-wrapper.active {
        display: flex;
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 15px;
        align-items: center;
    }

    .auth-buttons {
        width: 100%;
        flex-direction: column;
        border-top: 1px solid var(--border-color);
        padding-top: 20px;
        align-items: stretch;
    }

    .auth-buttons .btn {
        width: 100%;
    }

    .auth-buttons .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.2rem;
        gap: 6px;
    }

    .logo-text {
        max-width: 45vw;
    }

    .logo-tagline {
        display: -webkit-box !important;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        white-space: normal;
        font-size: 0.68rem;
        line-height: 1.3;
        max-width: 45vw;
        margin-top: 1px;
    }

    .logo-img {
        height: 34px;
    }

    header .container {
        padding-left: 12px;
        padding-right: 12px;
        gap: 6px;
    }
}


/* Bottom Navigation Bar */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65px;
    max-height: 65px;
    background-color: var(--white);
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.05);
    z-index: 9999;
    justify-content: space-around;
    align-items: center;
    padding: 0;
    margin: 0;
    border-top: 1px solid var(--border-color);
    flex-wrap: nowrap;
    overflow: hidden;
    box-sizing: border-box;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 11px !important;
    text-decoration: none;
    transition: var(--transition);
    flex: 1;
    height: 100%;
    white-space: nowrap;
    overflow: hidden;
}

.bottom-nav-item i {
    font-size: 20px !important;
    margin-bottom: 4px;
    display: block;
}

.footer-logo {
    margin-bottom: 20px;
    max-width: 100%;
}

.footer-logo .logo-tagline {
    max-width: 280px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bottom-nav-item.active {
    color: var(--primary-color);
    font-weight: 600;
}

.bottom-nav-item.active i {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .bottom-nav {
        display: flex;
    }

    footer {
        padding-bottom: 80px;
    }

    .dashboard-container {
        padding-bottom: 70px;
    }

    .dashboard-content {
        padding: 15px;
    }

    .d-flex {
        flex-wrap: wrap;
        gap: 10px;
    }

    .card .d-flex.justify-between {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .card form.d-flex {
        flex-direction: column;
        align-items: stretch !important;
    }

    .card form.d-flex .form-group {
        width: 100% !important;
    }
}

/* Tutor Dashboard — WordPress-style light sidebar */
.tutor-mobile-bar,
.tutor-sidebar-overlay {
    display: none;
}

.tutor-dashboard .tutor-sidebar {
    background: #ffffff;
    border-right: 1px solid #c3c4c7;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.tutor-dashboard .tutor-sidebar .sidebar-profile {
    padding: 24px 20px 20px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.tutor-dashboard .tutor-sidebar .sidebar-profile h4 {
    margin-bottom: 5px;
    color: var(--text-main);
    font-size: 1rem;
}

.tutor-dashboard .tutor-sidebar .tutor-id-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.tutor-dashboard .tutor-sidebar .sidebar-menu {
    margin-top: 8px;
    padding: 8px 0;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.tutor-dashboard .tutor-sidebar .sidebar-menu a {
    color: var(--text-muted);
    border-left: 4px solid transparent;
    border-radius: 0;
    margin-bottom: 0;
    padding: 11px 16px 11px 20px;
    font-weight: 500;
}

.tutor-dashboard .tutor-sidebar .sidebar-menu a:hover,
.tutor-dashboard .tutor-sidebar .sidebar-menu a.active {
    color: var(--primary-color);
    background: var(--primary-light);
    border-left-color: var(--primary-color);
}

.tutor-dashboard .tutor-sidebar .tutor-menu-badge {
    margin-left: auto;
    padding: 2px 7px;
    font-size: 0.72rem;
    border-radius: 10px;
}

.tutor-dashboard .tutor-sidebar .tutor-logout-link {
    color: var(--danger);
}

.tutor-dashboard .tutor-sidebar .tutor-sidebar-footer {
    flex-shrink: 0;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 11px 16px 11px 20px;
    border-top: 1px solid var(--border-color);
    background: #ffffff;
    font-weight: 500;
    text-decoration: none;
    border-left: 4px solid transparent;
    border-radius: 0;
}

.tutor-dashboard .tutor-sidebar .tutor-sidebar-footer i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.tutor-dashboard .tutor-sidebar .tutor-logout-link:hover,
.tutor-dashboard .tutor-sidebar .tutor-sidebar-footer:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.08);
    border-left-color: var(--danger);
}

.tutor-dashboard .dashboard-content {
    background: #f0f0f1;
}

.tutor-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.tutor-dashboard-header h2 {
    margin: 0;
}

.tutor-status-badge {
    font-size: 0.9rem;
    padding: 6px 16px;
    white-space: nowrap;
}

.tutor-account-banner {
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid var(--warning);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 30px;
}

.tutor-account-banner-inner {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.tutor-account-banner-icon {
    flex-shrink: 0;
    font-size: 1.8rem;
    color: var(--warning);
    line-height: 1;
    margin-top: 3px;
}

.tutor-account-banner-body {
    flex: 1;
    min-width: 0;
}

.tutor-account-banner-title {
    margin: 0 0 8px;
    color: var(--text-main);
    font-size: 1.05rem;
    line-height: 1.4;
}

.tutor-repayment-card {
    margin-top: 16px;
    padding: 16px;
    background: var(--white);
    border: 1px solid var(--border-color);
}

.tutor-repayment-title {
    margin: 0 0 14px;
    font-size: 1rem;
    line-height: 1.4;
    color: var(--text-main);
}

.tutor-repayment-form .form-group:last-of-type {
    margin-bottom: 0;
}

.tutor-repayment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.tutor-repayment-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
}

@media (max-width: 768px) {
    .tutor-dashboard-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 18px;
    }

    .tutor-dashboard-header h2 {
        font-size: 1.35rem;
    }

    .tutor-status-badge {
        width: 100%;
        text-align: center;
        white-space: normal;
        line-height: 1.4;
    }

    .tutor-account-banner {
        padding: 16px;
        margin-bottom: 20px;
    }

    .tutor-account-banner-inner {
        flex-direction: column;
        gap: 10px;
    }

    .tutor-account-banner-icon {
        margin-top: 0;
    }

    .tutor-account-banner-title {
        font-size: 1rem;
    }

    .tutor-repayment-card {
        margin-top: 14px;
        padding: 14px;
    }

    .tutor-repayment-form .form-control,
    .tutor-repayment-form .form-select {
        width: 100%;
    }

    .tutor-repayment-actions {
        flex-direction: column;
        gap: 8px;
    }

    .tutor-repayment-actions .btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .tutor-mobile-bar {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 10px 16px;
        background: #ffffff;
        border-bottom: 1px solid var(--border-color);
        position: sticky;
        top: var(--site-header-height, 64px);
        z-index: 900;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    }

    .tutor-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        background: transparent;
        border: 1px solid var(--border-color);
        border-radius: 4px;
        font-size: 1.1rem;
        cursor: pointer;
        color: var(--text-main);
        flex-shrink: 0;
    }

    .tutor-menu-toggle:hover {
        background: #f6f7f7;
    }

    .tutor-mobile-title {
        font-weight: 600;
        font-size: 1rem;
        color: var(--text-main);
    }

    .tutor-sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        z-index: 10000;
    }

    .tutor-sidebar-overlay.active {
        display: block;
    }

    body.tutor-menu-open {
        overflow: hidden;
    }

    .tutor-dashboard .dashboard-container {
        flex-direction: column;
        padding-bottom: 70px;
    }

    .tutor-dashboard .tutor-sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        max-width: 85vw;
        height: 100vh;
        height: 100dvh;
        z-index: 10001;
        transition: left 0.25s ease;
        overflow: hidden;
        border-right: 1px solid var(--border-color);
        border-bottom: none;
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.12);
    }

    .tutor-dashboard .tutor-sidebar.open {
        left: 0;
    }

    .tutor-dashboard .tutor-sidebar .sidebar-profile {
        display: block;
        flex-shrink: 0;
    }

    .tutor-dashboard .tutor-sidebar .sidebar-menu {
        display: flex;
        flex-direction: column;
        flex: 1;
        min-height: 0;
        overflow-x: visible;
        overflow-y: auto;
        white-space: normal;
        gap: 0;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }

    .tutor-dashboard .tutor-sidebar .sidebar-menu a {
        margin-bottom: 0;
        padding: 12px 16px 12px 20px;
        font-size: 0.95rem;
        flex-shrink: 0;
    }

    .tutor-dashboard .tutor-sidebar .tutor-sidebar-footer {
        flex-shrink: 0;
        padding: 12px 16px 16px 20px;
        border-top: 1px solid var(--border-color);
        background: #ffffff;
    }
}

/* Tutor profile edit form */
.tutor-profile-card {
    max-width: 900px;
}

.tutor-profile-form .grid-2 {
    gap: 20px;
}

.tutor-profile-form .tutor-profile-subjects {
    grid-column: 1 / -1;
}

.tutor-profile-photo-row {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 30px;
}

.tutor-profile-mediums {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
}

.tutor-profile-medium-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.tutor-profile-medium-option input {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.tutor-salary-range {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
}

.tutor-salary-separator {
    white-space: nowrap;
    color: var(--text-muted);
    font-weight: 600;
}

.tutor-profile-form-actions {
    margin-top: 30px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    flex-wrap: wrap;
}

.tutor-profile-form-actions .btn-primary {
    padding: 12px 30px;
}

@media (max-width: 768px) {
    .tutor-dashboard .dashboard-content {
        padding: 12px;
    }

    .tutor-profile-card {
        max-width: none;
        padding: 16px;
        border-radius: var(--radius-md);
    }

    .tutor-profile-form .grid-2,
    .tutor-profile-form .grid-2>.form-group {
        grid-column: auto;
        width: 100%;
        min-width: 0;
    }

    .tutor-profile-form .form-group {
        margin-bottom: 18px;
    }

    .tutor-profile-form .form-control,
    .tutor-profile-form .form-select {
        width: 100%;
        min-height: 48px;
        font-size: 16px;
        padding: 12px 14px;
    }

    .tutor-profile-photo-row {
        flex-direction: column;
        text-align: center;
        gap: 16px;
        padding-bottom: 24px;
        margin-bottom: 24px;
    }

    .tutor-profile-mediums {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .tutor-profile-medium-option {
        width: 100%;
    }

    .tutor-salary-range {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .tutor-salary-separator {
        text-align: center;
        padding: 2px 0;
    }

    .tutor-profile-form-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .tutor-profile-form-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Student Dashboard — WordPress-style light sidebar */
.student-mobile-bar,
.student-sidebar-overlay {
    display: none;
}

.student-dashboard .student-sidebar {
    background: #ffffff;
    border-right: 1px solid #c3c4c7;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.student-dashboard .student-sidebar .sidebar-profile {
    padding: 24px 20px 20px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.student-dashboard .student-sidebar .sidebar-profile h4 {
    margin-bottom: 8px;
    color: var(--text-main);
    font-size: 1rem;
}

.student-dashboard .student-sidebar .sidebar-menu {
    margin-top: 8px;
    padding: 8px 0;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.student-dashboard .student-sidebar .sidebar-menu a {
    color: var(--text-muted);
    border-left: 4px solid transparent;
    border-radius: 0;
    margin-bottom: 0;
    padding: 11px 16px 11px 20px;
    font-weight: 500;
}

.student-dashboard .student-sidebar .sidebar-menu a:hover,
.student-dashboard .student-sidebar .sidebar-menu a.active {
    color: var(--primary-color);
    background: var(--primary-light);
    border-left-color: var(--primary-color);
}

.student-dashboard .student-sidebar .student-menu-badge {
    margin-left: auto;
    padding: 2px 7px;
    font-size: 0.72rem;
    border-radius: 10px;
}

.student-dashboard .student-sidebar .student-logout-link {
    color: var(--danger);
}

.student-dashboard .student-sidebar .student-sidebar-footer {
    flex-shrink: 0;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 11px 16px 11px 20px;
    border-top: 1px solid var(--border-color);
    background: #ffffff;
    font-weight: 500;
    text-decoration: none;
    border-left: 4px solid transparent;
    border-radius: 0;
}

.student-dashboard .student-sidebar .student-sidebar-footer i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.student-dashboard .student-sidebar .student-logout-link:hover,
.student-dashboard .student-sidebar .student-sidebar-footer:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.08);
    border-left-color: var(--danger);
}

.student-dashboard .dashboard-content {
    background: #f0f0f1;
}

@media (max-width: 768px) {
    .student-mobile-bar {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 10px 16px;
        background: #ffffff;
        border-bottom: 1px solid var(--border-color);
        position: sticky;
        top: var(--site-header-height, 64px);
        z-index: 900;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    }

    .student-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        background: transparent;
        border: 1px solid var(--border-color);
        border-radius: 4px;
        font-size: 1.1rem;
        cursor: pointer;
        color: var(--text-main);
        flex-shrink: 0;
    }

    .student-menu-toggle:hover {
        background: #f6f7f7;
    }

    .student-mobile-title {
        font-weight: 600;
        font-size: 1rem;
        color: var(--text-main);
    }

    .student-sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        z-index: 10000;
    }

    .student-sidebar-overlay.active {
        display: block;
    }

    body.student-menu-open {
        overflow: hidden;
    }

    .student-dashboard .dashboard-container {
        flex-direction: column;
        padding-bottom: 70px;
    }

    .student-dashboard .student-sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        max-width: 85vw;
        height: 100vh;
        height: 100dvh;
        z-index: 10001;
        transition: left 0.25s ease;
        overflow: hidden;
        border-right: 1px solid var(--border-color);
        border-bottom: none;
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.12);
    }

    .student-dashboard .student-sidebar.open {
        left: 0;
    }

    .student-dashboard .student-sidebar .sidebar-profile {
        display: block;
        flex-shrink: 0;
    }

    .student-dashboard .student-sidebar .sidebar-menu {
        display: flex;
        flex-direction: column;
        flex: 1;
        min-height: 0;
        overflow-x: visible;
        overflow-y: auto;
        white-space: normal;
        gap: 0;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }

    .student-dashboard .student-sidebar .sidebar-menu a {
        margin-bottom: 0;
        padding: 12px 16px 12px 20px;
        font-size: 0.95rem;
        flex-shrink: 0;
    }

    .student-dashboard .student-sidebar .student-sidebar-footer {
        flex-shrink: 0;
        padding: 12px 16px 16px 20px;
        border-top: 1px solid var(--border-color);
        background: #ffffff;
    }
}

/* Admin Dashboard — WordPress-style light sidebar */
.admin-dashboard {
    max-width: 100%;
    overflow-x: clip;
}

.admin-mobile-bar,
.admin-sidebar-overlay {
    display: none;
}

.admin-dashboard .admin-sidebar {
    background: #ffffff;
    border-right: 1px solid #c3c4c7;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex-shrink: 0;
    width: 280px;
}

.admin-dashboard .dashboard-container {
    min-width: 0;
    max-width: 100%;
}

.admin-dashboard .dashboard-content {
    background: #f0f0f1;
    flex: 1 1 0%;
    min-width: 0;
    max-width: 100%;
}

.admin-dashboard .admin-sidebar .sidebar-profile {
    padding: 24px 20px 20px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.admin-dashboard .admin-sidebar .sidebar-profile h4 {
    margin-bottom: 8px;
    color: var(--text-main);
    font-size: 1rem;
}

.admin-dashboard .admin-sidebar .sidebar-merchant-id {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    line-height: 1.4;
}

.admin-dashboard .admin-sidebar .sidebar-menu {
    margin-top: 8px;
    padding: 8px 0;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-dashboard .admin-sidebar .sidebar-menu a {
    color: var(--text-muted);
    border-left: 4px solid transparent;
    border-radius: 0;
    margin-bottom: 0;
    padding: 11px 16px 11px 20px;
    font-weight: 500;
}

.admin-dashboard .admin-sidebar .sidebar-menu a:hover,
.admin-dashboard .admin-sidebar .sidebar-menu a.active {
    color: var(--primary-color);
    background: var(--primary-light);
    border-left-color: var(--primary-color);
}

.admin-dashboard .admin-sidebar .admin-menu-label {
    flex: 1;
}

.admin-dashboard .admin-sidebar .admin-menu-badge {
    margin-left: auto;
    padding: 2px 7px;
    font-size: 0.72rem;
    border-radius: 10px;
}

.admin-dashboard .admin-sidebar .admin-logout-link {
    color: var(--danger);
}

.admin-dashboard .admin-sidebar .admin-sidebar-footer {
    flex-shrink: 0;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 11px 16px 11px 20px;
    border-top: 1px solid var(--border-color);
    background: #ffffff;
    font-weight: 500;
    text-decoration: none;
    border-left: 4px solid transparent;
    border-radius: 0;
}

.admin-dashboard .admin-sidebar .admin-sidebar-footer i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.admin-dashboard .admin-sidebar .admin-logout-link:hover,
.admin-dashboard .admin-sidebar .admin-sidebar-footer:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.08);
    border-left-color: var(--danger);
}

.admin-dashboard .admin-sidebar .sidebar-profile {
    margin: 0;
}

.admin-dashboard .admin-submenu-wrap {
    margin: 0;
}

.admin-dashboard .admin-submenu-toggle {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    padding: 11px 16px 11px 20px;
    border: none;
    border-left: 4px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--text-muted);
    font-weight: 500;
    font-family: inherit;
    font-size: inherit;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}

.admin-dashboard .admin-submenu-toggle i:first-child {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.admin-dashboard .admin-submenu-chevron {
    margin-left: auto;
    font-size: 0.72rem;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    width: auto !important;
}

.admin-dashboard .admin-submenu-wrap.is-open .admin-submenu-chevron {
    transform: rotate(180deg);
}

.admin-dashboard .admin-submenu-wrap.is-open .admin-submenu-toggle,
.admin-dashboard .admin-submenu-wrap.is-active .admin-submenu-toggle {
    color: var(--primary-color);
    background: var(--primary-light);
    border-left-color: var(--primary-color);
}

.admin-dashboard .admin-submenu-toggle:hover {
    color: var(--primary-color);
    background: var(--primary-light);
    border-left-color: var(--primary-color);
}

.admin-dashboard .admin-submenu {
    display: none;
    margin-left: 12px;
    padding: 2px 0 4px 8px;
    border-left: 2px solid rgba(0, 0, 0, 0.06);
    background: rgba(0, 0, 0, 0.02);
}

.admin-dashboard .admin-submenu-wrap.is-open .admin-submenu {
    display: block;
}

.admin-dashboard .admin-submenu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px 10px 20px;
    color: var(--text-muted);
    border-left: 4px solid transparent;
    border-radius: 0;
    margin-bottom: 0;
    font-weight: 500;
    text-decoration: none;
    font-size: 0.92rem;
}

.admin-dashboard .admin-submenu-item i {
    width: 18px;
    text-align: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.admin-dashboard .admin-submenu-item:hover,
.admin-dashboard .admin-submenu-item.active {
    color: var(--primary-color);
    background: var(--primary-light);
    border-left-color: var(--primary-color);
}

@media (max-width: 768px) {
    :root {
        --site-header-height: 64px !important;
    }

    .admin-mobile-bar {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 10px 16px;
        background: #ffffff;
        border-bottom: 1px solid var(--border-color);
        position: sticky;
        top: var(--site-header-height, 64px);
        z-index: 900;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    }

    .admin-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        background: transparent;
        border: 1px solid var(--border-color);
        border-radius: 4px;
        font-size: 1.1rem;
        cursor: pointer;
        color: var(--text-main);
        flex-shrink: 0;
    }

    .admin-menu-toggle:hover {
        background: #f6f7f7;
    }

    .admin-mobile-title {
        font-weight: 600;
        font-size: 1rem;
        color: var(--text-main);
    }

    .admin-sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        z-index: 10000;
    }

    .admin-sidebar-overlay.active {
        display: block;
    }

    body.admin-menu-open {
        overflow: hidden;
    }

    .admin-dashboard .dashboard-container {
        flex-direction: column;
        padding-bottom: 70px;
        min-width: 0;
        max-width: 100%;
        overflow-x: hidden;
    }

    .admin-dashboard .dashboard-content {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: hidden;
    }

    .admin-dashboard .admin-sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        max-width: 85vw;
        height: 100vh;
        height: 100dvh;
        z-index: 10001;
        transition: left 0.25s ease;
        overflow: hidden;
        border-right: 1px solid var(--border-color);
        border-bottom: none;
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.12);
    }

    .admin-dashboard .admin-sidebar.open {
        left: 0;
    }

    .admin-dashboard .admin-sidebar .sidebar-profile {
        display: block;
        flex-shrink: 0;
    }

    .admin-dashboard .admin-sidebar .sidebar-menu {
        display: flex;
        flex-direction: column;
        flex: 1;
        min-height: 0;
        overflow-x: visible;
        overflow-y: auto;
        white-space: normal;
        gap: 0;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }

    .admin-dashboard .admin-sidebar .sidebar-menu a {
        margin-bottom: 0;
        padding: 12px 16px 12px 20px;
        font-size: 0.95rem;
        flex-shrink: 0;
    }

    .admin-dashboard .admin-sidebar .admin-sidebar-footer {
        flex-shrink: 0;
        padding: 12px 16px 16px 20px;
        border-top: 1px solid var(--border-color);
        background: #ffffff;
    }
}

.admin-pagination-wrap {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.admin-pagination-summary {
    font-size: 0.9rem;
}

.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.admin-pagination-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    color: var(--text-color, #334155);
    background: #fff;
    text-decoration: none;
    flex-shrink: 0;
}

.admin-pagination-nav:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.admin-pagination-nav.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.admin-pagination-pages {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: nowrap;
    min-width: 0;
}

.admin-pagination-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid transparent;
    color: var(--text-color, #334155);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1;
    flex-shrink: 0;
}

.admin-pagination-page:hover {
    border-color: var(--border-color, #e2e8f0);
    background: #f8fafc;
}

.admin-pagination-page.is-active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    font-weight: 600;
}

.admin-pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    padding: 0 2px;
    color: var(--text-muted);
    font-size: 0.9rem;
    user-select: none;
    flex-shrink: 0;
}

@media (min-width: 769px) {
    .admin-pagination-wrap {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .admin-pagination {
        width: auto;
        justify-content: flex-end;
    }
}

@media (max-width: 768px) {
    .admin-pagination {
        gap: 6px;
    }

    .admin-pagination-nav {
        width: 40px;
        height: 40px;
    }

    .admin-pagination-page {
        min-width: 36px;
        height: 36px;
        font-size: 0.88rem;
    }

    .admin-pagination-ellipsis {
        min-width: 14px;
        font-size: 0.82rem;
    }
}

.admin-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 11050;
    padding: 16px;
    background: rgba(15, 23, 42, 0.55);
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.admin-modal.is-open {
    display: flex;
}

.admin-modal-dialog {
    width: 100%;
    max-width: 620px;
    max-height: min(90vh, calc(100dvh - 32px));
    margin: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.admin-modal-dialog>form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.admin-modal-dialog--lg {
    max-width: 800px;
}

.admin-modal-dialog--xl {
    max-width: 900px;
}

.admin-modal-dialog--fixed-scroll {
    height: min(520px, calc(100dvh - 32px));
    max-height: min(520px, calc(100dvh - 32px));
}

.admin-modal--fixed-scroll {
    overflow: hidden;
    align-items: center;
}

.admin-modal-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.admin-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.admin-modal-header h3 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--text-main);
}

.admin-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.admin-modal-close:hover {
    background: #f1f5f9;
    color: #334155;
}

.admin-modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px 20px;
    -webkit-overflow-scrolling: touch;
}

.admin-modal-meta {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.admin-modal-meta-row strong {
    display: inline-block;
    min-width: 58px;
    color: var(--text-main);
}

.admin-modal-message-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
}

.admin-modal-message-box strong {
    display: block;
    margin-bottom: 10px;
    color: var(--text-main);
}

.admin-modal-message-content {
    white-space: pre-wrap;
    line-height: 1.65;
    word-break: break-word;
    color: #334155;
}

.admin-modal-footer {
    flex-shrink: 0;
    padding: 12px 20px 16px;
    border-top: 1px solid #e5e7eb;
    text-align: right;
    background: #fff;
}

body.admin-modal-open {
    overflow: hidden;
}

body.admin-modal-open .site-header {
    visibility: hidden;
    pointer-events: none;
}

body.admin-modal-open .admin-mobile-bar,
body.admin-modal-open .admin-sidebar-overlay,
body.admin-modal-open .admin-sidebar {
    visibility: hidden;
    pointer-events: none;
}

@media (max-width: 768px) {
    .admin-modal {
        padding: 12px;
        align-items: flex-start;
    }

    .admin-modal-dialog {
        max-height: calc(100dvh - 24px);
        margin-top: auto;
        margin-bottom: auto;
        border-radius: 10px;
    }

    .admin-modal-dialog--fixed-scroll {
        height: calc(100dvh - 24px);
        max-height: calc(100dvh - 24px);
    }

    .admin-modal--fixed-scroll {
        align-items: center;
    }

    .admin-modal-grid-2 {
        grid-template-columns: 1fr;
    }

    .admin-modal-header,
    .admin-modal-body,
    .admin-modal-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
}

.merchant-community-link-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(99, 102, 241, 0.25);
}

.merchant-notice-card {
    border-left: 3px solid var(--primary-color);
}

.merchant-community-icon i[class*="fa-"],
.merchant-community-icon-preview i[class*="fa-"] {
    font-family: "Font Awesome 6 Free", sans-serif;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
    display: inline-block;
}

.merchant-community-icon i.fa-brands,
.merchant-community-icon-preview i.fa-brands {
    font-family: "Font Awesome 6 Brands", sans-serif;
    font-weight: 400;
}

.merchant-community-icon i.fa-solid,
.merchant-community-icon-preview i.fa-solid {
    font-weight: 900;
}

.merchant-community-icon i.fa-regular,
.merchant-community-icon-preview i.fa-regular {
    font-weight: 400;
}

.phone-with-wa {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.phone-wa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #25d366;
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1;
    flex-shrink: 0;
    transition: background 0.15s ease, transform 0.15s ease;
}

.phone-wa-btn:hover {
    background: #1da851;
    color: #fff;
    transform: translateY(-1px);
}

/* Floating Contact Widget */
.floating-contact-widget {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 10050;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.floating-contact-toggle {
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 8px 24px rgba(255, 107, 0, 0.35);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    position: relative;
    z-index: 1;
    isolation: isolate;
}

.floating-contact-widget:not(.is-open) .floating-contact-toggle::before,
.floating-contact-widget:not(.is-open) .floating-contact-toggle::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(255, 107, 0, 0.35);
    z-index: -1;
    pointer-events: none;
    animation: btnRippleRing 2.4s ease-out infinite;
}

.floating-contact-widget:not(.is-open) .floating-contact-toggle::after {
    animation-delay: 1.2s;
}

.floating-contact-toggle>i {
    line-height: 1;
    position: relative;
    z-index: 1;
}

.floating-contact-toggle .floating-contact-toggle-icon-open {
    display: inline-flex !important;
}

.floating-contact-toggle .floating-contact-toggle-icon-close {
    display: none !important;
}

.floating-contact-widget.is-open .floating-contact-toggle .floating-contact-toggle-icon-open {
    display: none !important;
}

.floating-contact-widget.is-open .floating-contact-toggle .floating-contact-toggle-icon-close {
    display: inline-flex !important;
}

.floating-contact-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(255, 107, 0, 0.42);
}

.floating-contact-widget:not(.is-open) .floating-contact-toggle:hover::before,
.floating-contact-widget:not(.is-open) .floating-contact-toggle:hover::after {
    animation-play-state: paused;
}

.floating-contact-options {
    display: none;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 4px;
}

.floating-contact-option {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-color);
}

.floating-contact-option-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
    color: var(--primary-color);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.floating-contact-option-label {
    background: #fff;
    padding: 8px 12px;
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.floating-contact-widget.is-open .floating-contact-options {
    display: flex;
}

.floating-contact-widget.is-open .floating-contact-option {
    animation: floatingContactIn 0.2s ease both;
    animation-delay: var(--fc-delay, 0ms);
}

@keyframes floatingContactIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes btnRippleRing {
    0% {
        transform: scale(1);
        opacity: 0.55;
    }

    100% {
        transform: scale(1.9);
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {

    .btn-icon-pop>i,
    .floating-contact-widget:not(.is-open) .floating-contact-toggle::before,
    .floating-contact-widget:not(.is-open) .floating-contact-toggle::after {
        animation: none !important;
    }
}

@media (max-width: 768px) {
    .floating-contact-widget {
        bottom: 82px;
        right: 14px;
        max-width: calc(100vw - 28px);
    }

    .floating-contact-toggle {
        width: 52px;
        height: 52px;
        font-size: 1.25rem;
    }

    .floating-contact-option-label {
        display: inline-block;
        font-size: 0.78rem;
        padding: 6px 10px;
        max-width: calc(100vw - 110px);
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Admin: Floating contact settings (frontend_settings.php) */
.fc-admin-intro,
.fc-admin-options-sub {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.fc-admin-form .form-label {
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.fc-admin-form .form-control {
    min-height: 42px;
}

.fc-admin-form .form-control-sm {
    min-height: 38px;
    padding: 6px 10px;
    font-size: 0.9rem;
}

.fc-admin-form small.text-muted {
    display: block;
    margin-top: 6px;
    font-size: 0.82rem;
    line-height: 1.45;
}

.fc-admin-top-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 16px 20px;
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-color);
}

.fc-admin-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    min-height: 46px;
}

.fc-admin-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    flex-shrink: 0;
}

.fc-icon-field {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.fc-icon-preview {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.fc-icon-preview-sm {
    width: 34px;
    height: 34px;
    font-size: 0.9rem;
}

.fc-admin-options-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.fc-admin-options-title {
    margin: 0 0 4px;
    font-size: 1.05rem;
}

.fc-admin-scroll-hint {
    display: none;
    font-size: 0.85rem;
    margin: 0 0 10px;
}

.fc-admin-table-wrap {
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.fc-admin-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.fc-admin-table th,
.fc-admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.fc-admin-table thead th {
    background: var(--bg-color);
    font-size: 0.84rem;
    font-weight: 700;
    white-space: nowrap;
    text-align: left;
}

.fc-admin-table thead th:first-child,
.fc-admin-table tbody td:first-child {
    text-align: center;
}

.fc-admin-table tbody tr:last-child td {
    border-bottom: none;
}

.fc-admin-table .form-control {
    min-height: 38px;
    margin: 0;
}

.fc-admin-input-sort {
    width: 72px;
    min-width: 72px;
}

.fc-admin-input-label {
    min-width: 120px;
}

.fc-admin-input-icon {
    min-width: 140px;
}

.fc-admin-input-url {
    min-width: 180px;
}

.fc-admin-table .remove-floating-contact-row {
    padding: 6px 10px;
}

.fc-admin-submit {
    min-height: 44px;
}

@media (max-width: 768px) {
    .fc-admin-top-grid {
        grid-template-columns: 1fr;
    }

    .fc-admin-options-head {
        flex-direction: column;
        align-items: stretch;
    }

    .fc-admin-add-btn,
    .fc-admin-submit {
        width: 100%;
        justify-content: center;
    }

    .fc-admin-scroll-hint {
        display: block;
    }

    .fc-admin-form .form-control-sm {
        font-size: 16px;
        min-height: 42px;
    }

    .fc-admin-table th,
    .fc-admin-table td {
        padding: 10px;
    }

    .admin-dashboard .dashboard-content {
        overflow-y: visible;
        overflow-x: hidden;
    }

    .admin-dashboard .dashboard-container {
        overflow-y: visible;
        overflow-x: hidden;
    }
}

/* Custom WebView Styles */
body.is-webview .logo {
    font-size: 1.85rem;
}
body.is-webview .logo-img {
    height: 44px;
}

@media (max-width: 768px) {
    body.is-webview .logo {
        font-size: 1.55rem;
    }
    body.is-webview .logo-img {
        height: 42px;
    }
    body.is-webview .logo-text {
        max-width: 75vw;
    }
}

@media (max-width: 480px) {
    body.is-webview .logo {
        font-size: 1.4rem;
    }
    body.is-webview .logo-img {
        height: 38px;
    }
}