:root {
    --fb-blue: #1877f2;
    --fb-blue-dark: #166fe5;
    --fb-dark: #1c1e21;
    --fb-gray: #f0f2f5;
    --fb-border: #dadde1;
    --fb-secondary: #65676b;
    --fb-white: #ffffff;
    --fb-green: #42b72a;
    --fb-red: #fa383e;
    --fb-bg: #f0f2f5;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 10px 34px rgba(0, 0, 0, 0.16);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 999px;
    --transition: 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.55;
    background: radial-gradient(circle at top, rgba(24, 119, 242, 0.08), transparent 36%), var(--fb-bg);
    color: var(--fb-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select, textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.fb-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(218, 221, 225, 0.9);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    gap: 14px;
}

.fb-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.fb-logo {
    font-size: 1.9rem;
    color: var(--fb-blue);
}

.fb-header-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.nav-link {
    padding: 10px 16px;
    border-radius: var(--radius-full);
    color: var(--fb-secondary);
    transition: var(--transition);
    border: 1px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(24, 119, 242, 0.1);
    color: var(--fb-blue);
    border-color: rgba(24, 119, 242, 0.18);
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-icon-btn,
.user-avatar-btn {
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    background: var(--fb-gray);
    display: grid;
    place-items: center;
    color: #555;
    transition: var(--transition);
}

.header-icon-btn:hover,
.user-avatar-btn:hover {
    background: #e4e6e9;
}

.badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--fb-red);
    color: #fff;
    font-size: 0.7rem;
    display: grid;
    place-items: center;
}

.user-menu {
    position: relative;
}

.user-dropdown {
    position: absolute;
    top: 52px;
    right: 0;
    width: 240px;
    background: white;
    border: 1px solid var(--fb-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.user-dropdown.show {
    display: flex;
}

.user-dropdown-item {
    padding: 12px 16px;
    text-align: left;
    border: none;
    background: transparent;
    width: 100%;
    cursor: pointer;
    transition: var(--transition);
}

.user-dropdown-item:hover {
    background: #f5f6f7;
}

.main-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
    padding: 24px 0 40px;
}

.sidebar {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--fb-border);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 110px);
    overflow: auto;
}

.sidebar h3 {
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fb-secondary);
    margin-bottom: 14px;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--fb-dark);
    margin-bottom: 6px;
    transition: var(--transition);
}

.sidebar a:hover,
.sidebar a.active {
    background: rgba(24, 119, 242, 0.08);
    color: var(--fb-blue);
}

.content-area {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--fb-border);
    box-shadow: var(--shadow-sm);
    padding: 28px 32px;
}

.content-area h1,
.content-area h2,
.content-area h3 {
    margin-bottom: 14px;
}

.content-area p,
.content-area li {
    color: var(--fb-secondary);
}

.breadcrumb {
    font-size: 0.9rem;
    color: var(--fb-secondary);
    margin-bottom: 20px;
}

.breadcrumb a {
    color: var(--fb-blue);
}

.hero-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin: 20px 0 28px;
    background: var(--fb-gray);
    border-radius: 999px;
    padding: 12px 18px;
    align-items: center;
}

.hero-search input {
    border: none;
    background: transparent;
    min-width: 0;
    font-size: 1rem;
    color: var(--fb-dark);
    outline: none;
}

.hero-search button {
    border: none;
    background: var(--fb-blue);
    color: white;
    border-radius: 999px;
    padding: 14px 24px;
    font-weight: 700;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.help-card {
    background: white;
    border: 1px solid var(--fb-border);
    border-radius: var(--radius-md);
    padding: 22px;
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
}

.help-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.help-card i {
    font-size: 1.9rem;
    color: var(--fb-blue);
    margin-bottom: 14px;
}

.help-card h3 {
    margin-bottom: 8px;
    font-size: 1rem;
}

.help-card p {
    color: var(--fb-secondary);
    font-size: 0.95rem;
}

.article-section,
.panel {
    background: #f8f9fa;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--fb-blue);
    padding: 18px;
    margin-top: 18px;
}

.article-section h3,
.panel h3 {
    margin-bottom: 10px;
}

.panel p,
.article-section p {
    margin-bottom: 0;
}

.form-card {
    background: white;
    border: 1px solid var(--fb-border);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.field-group {
    margin-bottom: 14px;
}

.field-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
}

.field-group input,
.field-group textarea,
.field-group select {
    width: 100%;
    border: 1px solid var(--fb-border);
    border-radius: 12px;
    padding: 14px 16px;
    outline: none;
    transition: border var(--transition), box-shadow var(--transition);
}

.field-group input:focus,
.field-group textarea:focus,
.field-group select:focus {
    border-color: var(--fb-blue);
    box-shadow: 0 0 0 4px rgba(24, 119, 242, 0.08);
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.suggestions-list {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.suggestion-item {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--fb-border);
    background: white;
    color: var(--fb-dark);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.suggestion-item:hover {
    background: #e7f3ff;
    border-color: rgba(24, 119, 242, 0.25);
}

.btn,
.btn-full {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border-radius: var(--radius-full);
    font-weight: 700;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--fb-blue);
    color: white;
}

.btn-secondary {
    background: var(--fb-green);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--fb-blue);
    color: var(--fb-blue);
}

.btn:hover {
    opacity: 0.95;
}

.toll-free-banner {
    display: flex;
    align-items: center;
    gap: 18px;
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border: 1px solid #ffd666;
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    margin: 22px 0;
}

.toll-icon {
    background: white;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #f7b928;
    font-size: 1.6rem;
    box-shadow: 0 8px 18px rgba(247, 185, 40, 0.16);
}

.toll-content h3 {
    margin-bottom: 6px;
    font-size: 1.1rem;
}

.toll-content .toll-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--fb-blue);
    margin: 0;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 30, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 2000;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    width: min(500px, 100%);
    background: white;
    border-radius: var(--radius-lg);
    padding: 26px;
    box-shadow: var(--shadow-lg);
}

.modal h2 {
    margin-bottom: 18px;
}

.chat-toggle {
    position: fixed;
    bottom: 22px;
    right: 22px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--fb-blue);
    border: none;
    color: white;
    font-size: 1.2rem;
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-lg);
    z-index: 1500;
}

.chat-window {
    position: fixed;
    right: 22px;
    bottom: 90px;
    width: 360px;
    max-height: 520px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: none;
    flex-direction: column;
    z-index: 1500;
}

.chat-window.open {
    display: flex;
}

.chat-header {
    background: var(--fb-blue);
    color: white;
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.chat-messages {
    padding: 14px;
    background: #f6f7f9;
    flex: 1;
    overflow-y: auto;
    display: grid;
    gap: 10px;
}

.message {
    max-width: 82%;
    padding: 12px 14px;
    border-radius: 18px;
    line-height: 1.5;
    word-break: break-word;
}

.message.user {
    justify-self: end;
    background: var(--fb-blue);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.support {
    justify-self: start;
    background: #e4e6eb;
    color: var(--fb-dark);
    border-bottom-left-radius: 4px;
}

.chat-input-area {
    display: flex;
    gap: 10px;
    padding: 14px;
    border-top: 1px solid var(--fb-border);
}

.chat-input-area input {
    flex: 1;
    border: 1px solid var(--fb-border);
    border-radius: 999px;
    padding: 12px 16px;
    outline: none;
}

.chat-input-area button {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--fb-blue);
    border: none;
    color: white;
}

.footer {
    background: white;
    border-top: 1px solid rgba(218, 221, 225, 0.9);
    padding: 22px 20px;
    text-align: center;
    font-size: 0.88rem;
    color: var(--fb-secondary);
}

.footer a {
    color: var(--fb-secondary);
}

.footer a:hover {
    color: var(--fb-blue);
}

.notification {
    background: #fff7dd;
    border: 1px solid #ffe3a8;
    border-left: 4px solid #f7b928;
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-bottom: 20px;
}

.progress-bar {
    height: 10px;
    background: #e9ecef;
    border-radius: 999px;
    overflow: hidden;
    margin: 18px 0;
}

.progress-fill {
    height: 100%;
    background: var(--fb-blue);
    width: 0;
    transition: width 0.4s ease;
}

.ticket-list {
    display: grid;
    gap: 12px;
}

.ticket-item {
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--fb-border);
    display: grid;
    gap: 8px;
}

.ticket-item .status {
    font-weight: 700;
}

.ticket-item .status.open {
    color: orange;
}

.ticket-item .status.resolved {
    color: var(--fb-green);
}

.hidden {
    display: none !important;
}

.faq-list {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.faq-item {
    background: white;
    border: 1px solid var(--fb-border);
    padding: 14px;
    border-radius: 12px;
}

.faq-question {
    margin-bottom: 8px;
    font-size: 1rem;
    color: var(--fb-dark);
}

.faq-answer {
    color: var(--fb-secondary);
    font-size: 0.95rem;
}

.faq-pager { }
.pager-btn {
    border: 1px solid var(--fb-border);
    background: white;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
}
.pager-btn[aria-current="true"] {
    background: var(--fb-blue);
    color: white;
    border-color: rgba(24, 119, 242, 0.18);
}

@media (max-width: 980px) {
    .main-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        max-height: none;
    }
}

@media (max-width: 680px) {
    .fb-header {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-links {
        justify-content: center;
    }

    .hero-search {
        grid-template-columns: 1fr;
    }

    .toll-free-banner {
        flex-direction: column;
        text-align: center;
    }
}
