@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ============================================================
   PT Naudira Berkah Teknik Chatbot - Stylesheet
   ============================================================ */

:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #818cf8;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg: #f1f5f9;
    --bg-dark: #0f172a;
    --card: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --sidebar-width: 260px;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    text-decoration: none;
}

.btn-secondary {
    background: var(--secondary);
    color: #fff;
}

.btn-secondary:hover {
    background: #475569;
    text-decoration: none;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
    text-decoration: none;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color .2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-check label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}

.form-check input {
    width: auto;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Cards */
.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.card h2 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text);
}

.card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.card-header-row h2 {
    margin-bottom: 0;
}

.is-hidden {
    display: none !important;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
}

.table tr:hover {
    background: #f8fafc;
}

.actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.active-row {
    background: #eef2ff !important;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

/* Page header */
.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
}

.page-header p {
    color: var(--text-muted);
    margin-top: 4px;
}

/* Grid */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.quick-links {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.text-muted {
    color: var(--text-muted);
}

/* Stat cards */
.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.stat-icon {
    font-size: 32px;
}

.stat-info h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.stat-info p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ============================================================
   Admin Layout
   ============================================================ */
.admin-body {
    background: var(--bg);
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-dark);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
}

.sidebar-brand {
    padding: 24px 20px;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #1e293b;
}

.brand-icon {
    font-size: 24px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
}

.sidebar-nav a {
    display: block;
    padding: 12px 16px;
    color: #94a3b8;
    border-radius: 8px;
    margin-bottom: 4px;
    font-size: 14px;
    transition: all .2s;
    text-decoration: none;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(79, 70, 229, .2);
    color: #fff;
    text-decoration: none;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid #1e293b;
}

.sidebar-footer p {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 8px;
}

.sidebar-footer .btn-outline {
    border-color: #475569;
    color: #94a3b8;
}

.sidebar-footer .btn-outline:hover {
    background: #475569;
    color: #fff;
}

.admin-main {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 32px;
}

.admin-mobile-header {
    display: none;
}

.admin-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.btn-sidebar-close {
    display: none;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Session List in Chat Logs */
.session-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 550px;
    overflow-y: auto;
    padding-right: 4px;
}

.session-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    background: #f8fafc;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.session-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    text-decoration: none;
}

.session-item.active {
    background: #eef2ff;
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.session-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.session-item.active .session-avatar {
    background: var(--primary);
}

.session-details {
    flex: 1;
    min-width: 0;
}

.session-user-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
    gap: 8px;
}

.session-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.session-time {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

.session-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.session-date {
    font-size: 12px;
    color: var(--text-muted);
}

.session-badge {
    background: #e2e8f0;
    color: var(--text);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
}

.session-item.active .session-badge {
    background: var(--primary);
    color: #fff;
}

/* Chat log (admin) */
.chat-log {
    max-height: 500px;
    overflow-y: auto;
}

.chat-log-msg {
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 8px;
}

.chat-log-user {
    background: #eef2ff;
}

.chat-log-bot {
    background: #f0fdf4;
}

.chat-log-sender {
    font-size: 12px;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.chat-log-text {
    font-size: 14px;
}

.chat-log-time {
    font-size: 11px;
    color: var(--text-muted);
}

.session-info {
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--text-muted);
}

/* ============================================================
   Auth Pages
   ============================================================ */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Add background decorative glowing circles */
.auth-body::before,
.auth-body::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    pointer-events: none;
}

.auth-body::before {
    background: rgba(129, 140, 248, 0.4);
    top: -50px;
    right: -50px;
}

.auth-body::after {
    background: rgba(124, 58, 237, 0.3);
    bottom: -50px;
    left: -50px;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 40px;
    width: min(100%, 420px);
    margin: 0 auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 10;
}

.auth-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 30px -5px rgba(0, 0, 0, 0.12), 0 15px 15px -5px rgba(0, 0, 0, 0.06);
}

.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

@media (max-width: 576px) {
    .auth-body {
        padding: 16px 12px;
    }

    .auth-card {
        padding: 28px 18px;
        border-radius: 16px;
    }

    .auth-header {
        margin-bottom: 22px;
    }

    .auth-logo {
        width: 72px;
        height: 72px;
    }

    .auth-header h1 {
        font-size: 22px;
    }

    .auth-header p {
        font-size: 12px;
    }

    .auth-form {
        margin-bottom: 18px;
    }

    .auth-form .form-group label {
        font-size: 12px;
    }

    .auth-form .form-group input {
        padding: 11px 14px;
    }

    .auth-form .btn-primary {
        padding: 11px;
        font-size: 14px;
    }

    .auth-footer {
        font-size: 13px;
    }

    .auth-footer p,
    .auth-footer a {
        font-size: 13px;
    }

    .auth-footer .back-to-home {
        font-size: 12px;
        margin-top: 10px;
    }
}

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.auth-logo {
    width: 88px;
    height: 88px;
    object-fit: contain;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 18px -10px rgba(79, 70, 229, 0.45);
    padding: 10px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-card:hover .auth-logo {
    transform: scale(1.04) rotate(-4deg);
}

.auth-brand-text {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: #6b7280;
}

.auth-header h1 {
    font-size: 26px;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.auth-header p {
    color: #6b7280;
    font-size: 14px;
}

.auth-form {
    margin-bottom: 24px;
}

.auth-form .form-group label {
    color: #374151;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 13px;
    letter-spacing: 0.01em;
}

.auth-form .form-group input {
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    color: #1f2937;
    transition: all 0.2s ease;
}

.auth-form .form-group input:focus {
    background: #fff;
    border-color: #4f46e5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    outline: none;
}

.auth-form .btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #fff;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2), 0 2px 4px -1px rgba(79, 70, 229, 0.1);
    transition: all 0.2s ease;
}

.auth-form .btn-primary:hover {
    background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3), 0 4px 6px -2px rgba(79, 70, 229, 0.2);
}

.auth-form .btn-primary:active {
    transform: translateY(1px);
}

.auth-footer {
    text-align: center;
    font-size: 14px;
}

.auth-footer p {
    color: #4b5563;
    font-size: 14px;
    margin-bottom: 8px;
}

.auth-footer a {
    color: #4f46e5;
    font-weight: 600;
    transition: color 0.2s ease;
}

.auth-footer a:hover {
    color: #7c3aed;
    text-decoration: none;
}

.auth-footer .back-to-home {
    display: inline-block;
    margin-top: 12px;
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
    transition: color 0.2s ease;
}

.auth-footer .back-to-home:hover {
    color: #374151;
    text-decoration: none;
}

.auth-hint {
    background: #f3f4f6;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 11px;
    color: #6b7280;
    margin-top: 20px;
    line-height: 1.5;
}

/* ============================================================
   Landing Page
   ============================================================ */
.landing-body {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
    min-height: 100vh;
}

.landing-hero {
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px 20px;
    text-align: center;
    color: #fff;
}

.hero-icon {
    font-size: 72px;
    display: block;
    margin-bottom: 16px;
}

.landing-hero h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 20px;
    opacity: .9;
    margin-bottom: 8px;
}

.hero-desc {
    font-size: 16px;
    opacity: .7;
    max-width: 600px;
    margin: 0 auto 32px;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.landing-hero .btn-outline {
    border-color: #fff;
    color: #fff;
}

.landing-hero .btn-outline:hover {
    background: #fff;
    color: var(--primary);
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.feature-card {
    background: rgba(255, 255, 255, .1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, .15);
}

.feature-card span {
    font-size: 36px;
    display: block;
    margin-bottom: 12px;
}

.feature-card h3 {
    font-size: 16px;
    margin-bottom: 6px;
}

.feature-card p {
    font-size: 13px;
    opacity: .7;
}

.landing-footer {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, .5);
    font-size: 13px;
}

/* ============================================================
   User Layout
   ============================================================ */
.user-header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo:hover {
    text-decoration: none;
}

.user-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-nav a {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.user-nav a:hover {
    color: var(--primary);
}

.user-greeting {
    font-size: 14px;
    color: var(--text-muted);
}

.user-main {
    min-height: calc(100vh - 130px);
    padding: 24px 0;
}

.user-footer {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 13px;
    border-top: 1px solid var(--border);
}

/* ============================================================
   Chat Interface
   ============================================================ */
.chat-container {
    max-width: 800px;
}

.chat-wrapper {
    background: var(--card);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 180px);
    min-height: 500px;
}

.chat-header {
    padding: 16px 20px;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    font-size: 36px;
}

.chat-header h2 {
    font-size: 18px;
}

.chat-status {
    font-size: 12px;
    opacity: .8;
}

.chat-header .btn-outline {
    border-color: rgba(255, 255, 255, .5);
    color: #fff;
    font-size: 12px;
}

.chat-header .btn-outline:hover {
    background: rgba(255, 255, 255, .2);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-msg {
    display: flex;
    gap: 10px;
    max-width: 85%;
    animation: fadeIn .3s ease;
}

.user-msg {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.bot-msg {
    align-self: flex-start;
}

.msg-avatar {
    font-size: 28px;
    flex-shrink: 0;
}

.msg-content {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.user-msg .msg-content {
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.bot-msg .msg-content {
    background: #f1f5f9;
    color: var(--text);
    border-bottom-left-radius: 4px;
}

.msg-time {
    display: block;
    font-size: 11px;
    opacity: .6;
    margin-top: 4px;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.quick-btn {
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #fff;
    font-size: 12px;
    cursor: pointer;
    transition: all .2s;
}

.quick-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.chat-typing {
    padding: 8px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: .2s;
}

.typing-dot:nth-child(3) {
    animation-delay: .4s;
}

.chat-input {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    background: #fafafa;
}

.chat-input input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 24px;
    font-size: 14px;
    outline: none;
}

.chat-input input:focus {
    border-color: var(--primary);
}

.chat-input .btn {
    border-radius: 24px;
    padding: 12px 24px;
}

/* Product admin form */
.product-form-card {
    margin-bottom: 20px;
}

.product-form .form-group {
    margin-bottom: 0;
}

.product-form-grid {
    display: grid;
    grid-template-columns: 1.2fr 2fr 1fr 0.8fr 1.5fr;
    gap: 16px;
    align-items: end;
    margin-bottom: 16px;
}

.product-preview-image,
.product-thumbnail {
    display: block;
    width: 72px;
    height: 72px;
    object-fit: contain;
    object-position: center;
    background: #fff;
    border-radius: 8px;
    margin-top: 8px;
    border: 1px solid var(--border);
}

.product-form-bottom {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: end;
}

.product-form-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.product-form-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Category admin form */
.category-form-card {
    margin-bottom: 20px;
}

.category-form .form-group {
    margin-bottom: 0;
}

.category-form-grid {
    display: grid;
    grid-template-columns: 1.5fr 3fr auto;
    gap: 16px;
    align-items: end;
}

.category-form-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* FAQ admin form */
.faq-form-card {
    margin-bottom: 20px;
}

.faq-form .form-group {
    margin-bottom: 0;
}

.faq-form-grid {
    display: grid;
    grid-template-columns: 2fr 3fr 1.5fr;
    gap: 16px;
    align-items: end;
    margin-bottom: 16px;
}

.faq-form-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.faq-form-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Product grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: transform .2s;
}

.product-card:hover {
    transform: translateY(-2px);
}

.product-image-wrap {
    width: 100%;
    height: 180px;
    margin-bottom: 12px;
    border-radius: 10px;
    overflow: hidden;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.product-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.product-category {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
}

.product-card h3 {
    font-size: 16px;
    margin: 6px 0;
}

.product-card p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-weight: 700;
    color: var(--primary);
}

.product-stock {
    font-size: 12px;
    font-weight: 600;
}

.in-stock {
    color: var(--success);
}

.out-stock {
    color: var(--danger);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typingBounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-6px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .admin-mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
        background: var(--bg-dark);
        color: #fff;
        position: sticky;
        top: 0;
        z-index: 999;
        box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
        height: 56px;
    }

    .btn-menu-toggle {
        background: transparent;
        border: none;
        color: #fff;
        font-size: 24px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 4px;
    }

    .mobile-brand {
        font-size: 16px;
        font-weight: 700;
    }

    .sidebar {
        display: flex !important;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 1001;
        width: var(--sidebar-width);
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 2px 0 8px rgba(0, 0, 0, .15);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .btn-sidebar-close {
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        color: #94a3b8;
        font-size: 20px;
        cursor: pointer;
        margin-left: auto;
        padding: 4px;
    }

    .sidebar-brand {
        display: flex;
        align-items: center;
        width: 100%;
    }

    .admin-main {
        margin-left: 0;
        padding: 24px 16px;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .product-form-grid,
    .category-form-grid,
    .faq-form-grid {
        grid-template-columns: 1fr;
    }

    .product-form-bottom {
        grid-template-columns: 1fr;
    }

    .faq-form-bottom {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .product-form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .product-form-buttons,
    .category-form-buttons,
    .faq-form-buttons {
        justify-content: stretch;
    }

    .product-form-buttons .btn,
    .category-form-buttons .btn,
    .faq-form-buttons .btn {
        flex: 1;
    }

    .card-header-row {
        flex-direction: column;
        align-items: stretch;
    }

    .header-inner {
        flex-direction: column;
        gap: 12px;
    }

    .user-nav {
        gap: 12px;
        width: 100%;
        justify-content: center;
    }

    .user-greeting {
        display: none;
    }

    .chat-wrapper {
        height: calc(100vh - 140px);
    }

    .landing-hero h1 {
        font-size: 28px;
    }
}