/* ============================================================
   AttendUX Documentation — Complete Stylesheet
   Matches landing page design system
   ============================================================ */

:root {
    --primary-color: #317ed8;
    --primary-dark: #1d589d;
    --secondary-color: #4a90e2;
    --accent-color: #5ba2f5;
    --success-color: #28a745;
    --warning-color: #f0ad4e;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --white: #ffffff;
    --light-blue: #f8fbff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    --shadow-sm: 0 2px 4px rgba(49, 126, 216, 0.1);
    --shadow-md: 0 4px 12px rgba(49, 126, 216, 0.15);
    --shadow-lg: 0 8px 25px rgba(49, 126, 216, 0.2);
    --sidebar-width: 280px;
    --header-height: 80px;
    --docs-radius: 12px;
    --docs-transition: all 0.3s ease;
}

/* ===== DOCS LAYOUT ===== */
.docs-layout {
    display: flex;
    min-height: calc(100vh - var(--header-height));
    padding-top: var(--header-height);
}

/* ===== SIDEBAR ===== */
.docs-sidebar {
    width: var(--sidebar-width);
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    left: 0;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
    transition: transform 0.3s ease;
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) transparent;
}

html[dir="rtl"] .docs-sidebar {
    left: auto;
    right: 0;
    border-right: none;
    border-left: 1px solid var(--gray-200);
}

.docs-sidebar::-webkit-scrollbar {
    width: 5px;
}

.docs-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.docs-sidebar::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 10px;
}

.docs-sidebar-inner {
    padding: 20px 0;
}

/* Sidebar Search */
.docs-sidebar-search {
    padding: 0 16px 16px;
    border-bottom: 1px solid var(--gray-100);
    margin-bottom: 8px;
}

.docs-sidebar-search-input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.85rem;
    color: var(--gray-700);
    background: var(--gray-50);
    outline: none;
    transition: var(--docs-transition);
}

html[dir="rtl"] .docs-sidebar-search-input {
    padding: 10px 38px 10px 14px;
}

.docs-sidebar-search-input:focus {
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(49, 126, 216, 0.1);
}

.docs-sidebar-search-icon {
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 0.8rem;
    pointer-events: none;
}

html[dir="rtl"] .docs-sidebar-search-icon {
    left: auto;
    right: 28px;
}

.docs-sidebar-search {
    position: relative;
}

/* Sidebar Section Label */
.docs-sidebar-label {
    padding: 12px 20px 6px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--gray-400);
}

/* Sidebar Links */
.docs-sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    text-decoration: none;
    color: var(--gray-600);
    font-size: 0.88rem;
    font-weight: 500;
    transition: var(--docs-transition);
    border-left: 3px solid transparent;
    position: relative;
}

html[dir="rtl"] .docs-sidebar-link {
    border-left: none;
    border-right: 3px solid transparent;
}

.docs-sidebar-link:hover {
    background: var(--light-blue);
    color: var(--primary-color);
}

.docs-sidebar-link.active {
    background: var(--light-blue);
    color: var(--primary-color);
    font-weight: 600;
    border-left-color: var(--primary-color);
}

html[dir="rtl"] .docs-sidebar-link.active {
    border-left-color: transparent;
    border-right-color: var(--primary-color);
}

.docs-sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 0.85rem;
    flex-shrink: 0;
    opacity: 0.7;
}

.docs-sidebar-link.active i {
    opacity: 1;
}

.docs-sidebar-separator {
    height: 1px;
    background: var(--gray-200);
    margin: 12px 20px;
}

/* Mobile sidebar toggle — hidden, hamburger in navbar is used instead */
.docs-mobile-sidebar-toggle {
    display: none !important;
    position: fixed;
    bottom: 100px;
    left: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 200;
    align-items: center;
    justify-content: center;
    transition: var(--docs-transition);
}

html[dir="rtl"] .docs-mobile-sidebar-toggle {
    left: auto;
    right: 20px;
}

.docs-mobile-sidebar-toggle:hover {
    transform: scale(1.08);
}

.docs-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99;
}

/* ===== MAIN CONTENT ===== */
.docs-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-width: 0;
}

html[dir="rtl"] .docs-main {
    margin-left: 0;
    margin-right: var(--sidebar-width);
}

.docs-content-wrapper {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
}

.docs-content {
    flex: 1;
    min-width: 0;
    padding: 32px 40px 80px;
}

/* ===== HERO ===== */
.docs-hero {
    background: var(--gradient-primary);
    padding: 36px 40px;
    margin: 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.docs-hero::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.docs-hero h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.docs-hero p {
    font-size: 0.95rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.docs-hero-icon {
    font-size: 1.2rem;
    margin-right: 10px;
    opacity: 0.8;
}

html[dir="rtl"] .docs-hero-icon {
    margin-right: 0;
    margin-left: 10px;
}

/* ===== BREADCRUMB ===== */
.docs-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 40px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.82rem;
    color: var(--gray-500);
    flex-wrap: wrap;
}

.docs-breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.docs-breadcrumb a:hover {
    text-decoration: underline;
}

.docs-breadcrumb-sep {
    color: var(--gray-300);
}

/* ===== SEARCH BAR (Hero) ===== */
.docs-search-bar {
    position: relative;
    max-width: 600px;
    margin: 24px auto 0;
    z-index: 2;
}

.docs-search-bar input {
    width: 100%;
    padding: 16px 20px 16px 48px;
    border: none;
    border-radius: 50px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--gray-800);
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    outline: none;
    transition: var(--docs-transition);
}

html[dir="rtl"] .docs-search-bar input {
    padding: 16px 48px 16px 20px;
}

.docs-search-bar input:focus {
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.18);
}

.docs-search-bar input::placeholder {
    color: var(--gray-400);
}

.docs-search-bar-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 1rem;
    pointer-events: none;
}

html[dir="rtl"] .docs-search-bar-icon {
    left: auto;
    right: 18px;
}

/* Search Results Dropdown */
.docs-search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: white;
    border-radius: var(--docs-radius);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: none;
    max-height: 420px;
    overflow-y: auto;
    z-index: 1000;
    border: 1px solid var(--gray-200);
}

.docs-search-results.show {
    display: block;
}

.docs-search-result-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 18px;
    text-decoration: none;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.15s ease;
    cursor: pointer;
}

.docs-search-result-item:last-child {
    border-bottom: none;
}

.docs-search-result-item:hover,
.docs-search-result-item.active {
    background: var(--light-blue);
}

.docs-search-result-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--light-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary-color);
    font-size: 0.8rem;
}

.docs-search-result-text {
    flex: 1;
    min-width: 0;
}

.docs-search-result-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-800);
    margin-bottom: 2px;
}

.docs-search-result-title mark {
    background: rgba(49, 126, 216, 0.15);
    color: var(--primary-color);
    border-radius: 2px;
    padding: 0 2px;
}

.docs-search-result-desc {
    font-size: 0.78rem;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.docs-search-result-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
    background: var(--gray-100);
    color: var(--gray-500);
    margin-top: 4px;
}

.docs-search-no-results {
    padding: 24px;
    text-align: center;
    color: var(--gray-400);
    font-size: 0.88rem;
}

.docs-search-no-results i {
    display: block;
    font-size: 1.8rem;
    margin-bottom: 8px;
    opacity: 0.5;
}

/* Sidebar Search Results (Smart Search overlay inside sidebar) */
.docs-sidebar-search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    display: none;
    max-height: 360px;
    overflow-y: auto;
    z-index: 1100;
    border: 1px solid var(--gray-200);
}

.docs-sidebar-search-results.show {
    display: block;
}

.docs-sidebar-search-results .docs-search-result-item {
    padding: 10px 14px;
    gap: 10px;
}

.docs-sidebar-search-results .docs-search-result-icon {
    width: 28px;
    height: 28px;
    font-size: 0.72rem;
}

.docs-sidebar-search-results .docs-search-result-title {
    font-size: 0.82rem;
}

.docs-sidebar-search-results .docs-search-result-desc {
    font-size: 0.72rem;
}

.docs-sidebar-search-results .docs-search-result-badge {
    font-size: 0.6rem;
}

.docs-sidebar-search-results .docs-search-no-results {
    padding: 18px 12px;
    font-size: 0.8rem;
}

.docs-sidebar-search-results .docs-search-no-results i {
    font-size: 1.4rem;
    margin-bottom: 6px;
}

/* ===== TABLE OF CONTENTS (Right Rail) ===== */
.docs-toc {
    width: 220px;
    flex-shrink: 0;
    padding: 32px 16px;
    position: sticky;
    top: calc(var(--header-height) + 20px);
    max-height: calc(100vh - var(--header-height) - 40px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--gray-200) transparent;
}

.docs-toc-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-400);
    margin-bottom: 12px;
}

.docs-toc a {
    display: block;
    padding: 5px 0 5px 14px;
    text-decoration: none;
    color: var(--gray-500);
    font-size: 0.8rem;
    border-left: 2px solid var(--gray-200);
    transition: var(--docs-transition);
    line-height: 1.5;
}

html[dir="rtl"] .docs-toc a {
    padding: 5px 14px 5px 0;
    border-left: none;
    border-right: 2px solid var(--gray-200);
}

.docs-toc a:hover {
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

html[dir="rtl"] .docs-toc a:hover {
    border-left-color: var(--gray-200);
    border-right-color: var(--primary-color);
}

.docs-toc a.active {
    color: var(--primary-color);
    font-weight: 600;
    border-left-color: var(--primary-color);
}

html[dir="rtl"] .docs-toc a.active {
    border-left-color: var(--gray-200);
    border-right-color: var(--primary-color);
}

.docs-toc a.toc-h3 {
    padding-left: 28px;
    font-size: 0.76rem;
}

html[dir="rtl"] .docs-toc a.toc-h3 {
    padding-left: 0;
    padding-right: 28px;
}

/* ===== CONTENT TYPOGRAPHY ===== */
.docs-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 40px 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 10px;
}

.docs-content h2:first-child {
    margin-top: 0;
}

.docs-content h2 i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.docs-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 28px 0 12px;
}

.docs-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-700);
    margin: 20px 0 8px;
}

.docs-content p {
    color: var(--gray-600);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 14px;
}

.docs-content ul, .docs-content ol {
    padding-left: 24px;
    margin-bottom: 16px;
    color: var(--gray-600);
}

html[dir="rtl"] .docs-content ul,
html[dir="rtl"] .docs-content ol {
    padding-left: 0;
    padding-right: 24px;
}

.docs-content li {
    margin-bottom: 6px;
    font-size: 0.93rem;
    line-height: 1.7;
}

.docs-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.docs-content a:hover {
    text-decoration: underline;
}

/* ===== CARDS ===== */
.docs-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--docs-radius);
    padding: 24px;
    margin-bottom: 20px;
    transition: var(--docs-transition);
}

.docs-card:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-sm);
}

.docs-card h4 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== QUICK LINK CARDS (Home Grid) ===== */
.docs-quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin: 24px 0 32px;
}

.docs-quick-link {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--docs-radius);
    text-decoration: none;
    color: var(--gray-700);
    transition: var(--docs-transition);
}

.docs-quick-link:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: var(--gray-700);
    text-decoration: none;
}

.docs-quick-link-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--light-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary-color);
    font-size: 1.1rem;
    transition: var(--docs-transition);
}

.docs-quick-link:hover .docs-quick-link-icon {
    background: var(--primary-color);
    color: white;
}

.docs-quick-link-text h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--gray-800);
}

.docs-quick-link-text p {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin: 0;
    line-height: 1.5;
}

/* ===== FIELD TABLE ===== */
.docs-field-table-wrapper {
    overflow-x: auto;
    margin-bottom: 20px;
    border-radius: var(--docs-radius);
    border: 1px solid var(--gray-200);
}

.docs-field-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.docs-field-table thead {
    background: var(--gray-50);
}

.docs-field-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
}

html[dir="rtl"] .docs-field-table th {
    text-align: right;
}

.docs-field-table td {
    padding: 10px 16px;
    color: var(--gray-600);
    border-bottom: 1px solid var(--gray-100);
    vertical-align: top;
}

.docs-field-table tr:last-child td {
    border-bottom: none;
}

.docs-field-table tr:hover td {
    background: var(--light-blue);
}

.docs-field-table .field-required {
    color: var(--success-color);
    font-weight: 700;
}

.docs-field-table .field-optional {
    color: var(--gray-400);
}

.docs-field-table code {
    background: var(--gray-100);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.82rem;
    color: var(--primary-dark);
}

/* ===== TABLE ALIASES (docs-table-responsive / docs-table) ===== */
/* Some pages use .docs-table-responsive + .docs-table instead of
   .docs-field-table-wrapper + .docs-field-table — mirror the styles. */
.docs-table-responsive {
    overflow-x: auto;
    margin-bottom: 20px;
    border-radius: var(--docs-radius);
    border: 1px solid var(--gray-200);
}

.docs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.docs-table thead {
    background: var(--gray-50);
}

.docs-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
}

html[dir="rtl"] .docs-table th {
    text-align: right;
}

.docs-table td {
    padding: 10px 16px;
    color: var(--gray-600);
    border-bottom: 1px solid var(--gray-100);
    vertical-align: top;
}

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

.docs-table tr:hover td {
    background: var(--light-blue);
}

.docs-table .field-required {
    color: var(--success-color);
    font-weight: 700;
}

.docs-table .field-optional {
    color: var(--gray-400);
}

.docs-table code {
    background: var(--gray-100);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.82rem;
    color: var(--primary-dark);
}

/* ===== TIP / WARNING / DANGER / EXAMPLE BOXES ===== */
.docs-tip,
.docs-warning,
.docs-danger,
.docs-example {
    padding: 16px 20px;
    border-radius: var(--docs-radius);
    margin: 16px 0;
    font-size: 0.9rem;
    line-height: 1.7;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.docs-tip i,
.docs-warning i,
.docs-danger i {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Tip (Blue) */
.docs-tip {
    background: #eef6ff;
    border: 1px solid #b3d7ff;
    color: #1a5a96;
}

.docs-tip i {
    color: var(--primary-color);
}

/* Warning (Amber) */
.docs-warning {
    background: #fff8e5;
    border: 1px solid #ffe0a3;
    color: #8a6d00;
}

.docs-warning i {
    color: var(--warning-color);
}

/* Danger (Red) */
.docs-danger {
    background: #fef0f0;
    border: 1px solid #ffc1c1;
    color: #8b1a1a;
}

.docs-danger i {
    color: var(--danger-color);
}

/* Example (Green) */
.docs-example {
    background: #f0faf0;
    border: 1px solid #b8e6b8;
    color: #1a6b1a;
    flex-direction: column;
    gap: 8px;
}

.docs-example-title {
    font-weight: 700;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.docs-example-title i {
    color: var(--success-color);
}

.docs-example p {
    color: #2d6b2d;
    margin: 0;
    font-size: 0.88rem;
}

/* ===== EXAMPLE BOX / EXAMPLE CARD / EXAMPLE SCENARIO (aliases) ===== */
.docs-example-box {
    background: #f0faf0;
    border: 1px solid #b8e6b8;
    border-radius: var(--docs-radius);
    padding: 20px 24px;
    margin: 16px 0;
    color: #1a6b1a;
}

.docs-example-box h4 {
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 700;
    color: #1a6b1a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.docs-example-box h4 i {
    color: var(--success-color);
}

.docs-example-box p {
    margin: 0;
    font-size: 0.9rem;
    color: #2d6b2d;
}

.docs-example-card {
    background: #f0faf0;
    border: 1px solid #b8e6b8;
    border-radius: var(--docs-radius);
    padding: 24px;
    margin: 16px 0;
}

.docs-example-scenario {
    font-weight: 700;
    font-size: 0.95rem;
    color: #1a6b1a;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== BADGE (inline status labels) ===== */
.docs-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.docs-badge.success {
    background: #e8f5e9;
    color: var(--success-color);
}

.docs-badge.danger {
    background: #fef0f0;
    color: var(--danger-color);
}

.docs-badge.warning {
    background: #fff8e5;
    color: #8a6d00;
}

.docs-badge.info {
    background: #e0f2ff;
    color: var(--info-color);
}

/* ===== CHECKLIST ITEM (alternative pattern) ===== */
.docs-checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.93rem;
    color: var(--gray-600);
}

.docs-checklist-item i {
    color: var(--success-color);
    flex-shrink: 0;
    margin-top: 3px;
}

/* ===== STEPS ===== */
.docs-steps {
    margin: 20px 0;
}

.docs-step {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    position: relative;
}

.docs-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 18px;
    top: 42px;
    bottom: -4px;
    width: 2px;
    background: var(--gray-200);
}

html[dir="rtl"] .docs-step:not(:last-child)::after {
    left: auto;
    right: 18px;
}

.docs-step-number {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.docs-step-content {
    flex: 1;
    padding-top: 4px;
}

.docs-step-content h4 {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
}

.docs-step-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--gray-500);
}

/* ===== BUTTON REFERENCE (Inline) ===== */
.docs-button-ref {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--primary-color);
    color: white;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    vertical-align: middle;
}

.docs-button-ref.btn-success {
    background: var(--success-color);
}

.docs-button-ref.btn-danger {
    background: var(--danger-color);
}

.docs-button-ref.btn-warning {
    background: var(--warning-color);
    color: var(--gray-900);
}

.docs-button-ref.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

/* ===== UI MOCKUP ILLUSTRATIONS ===== */
.docs-screenshot,
.docs-screenshot-placeholder {
    border: 1px solid var(--gray-200);
    border-radius: var(--docs-radius);
    margin: 20px 0;
    background: var(--gray-50);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.docs-screenshot i,
.docs-screenshot-placeholder i {
    display: inline;
    font-size: inherit;
    margin-bottom: 0;
    opacity: 1;
}

/* =======================================================================
   MOCKUP UI ILLUSTRATIONS — Complete Design System
   Professional CSS-based UI mockups with full isolation from .docs-content
   ======================================================================= */

/* ── HARD RESET: Completely isolate mockup internals from .docs-content ── */
.docs-mockup,
.docs-mockup *,
.docs-mockup *::before,
.docs-mockup *::after {
    box-sizing: border-box !important;
}

/* Reset elements that .docs-content explicitly styles with strong rules */
.docs-content .docs-mockup h2,
.docs-content .docs-mockup h3,
.docs-content .docs-mockup h4 {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-bottom: none !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    color: #1a2332 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.docs-content .docs-mockup p {
    margin: 0 0 4px !important;
    padding: 0 !important;
    font-size: 0.74rem !important;
    line-height: 1.5 !important;
    color: #697586 !important;
    border: none !important;
}

.docs-content .docs-mockup ul,
.docs-content .docs-mockup ol {
    margin: 0 0 6px !important;
    padding-left: 16px !important;
    padding-right: 0 !important;
    color: #697586 !important;
    list-style: disc !important;
    border: none !important;
}

html[dir="rtl"] .docs-content .docs-mockup ul,
html[dir="rtl"] .docs-content .docs-mockup ol {
    padding-left: 0 !important;
    padding-right: 16px !important;
}

.docs-content .docs-mockup li {
    margin: 0 0 2px !important;
    padding: 0 !important;
    font-size: 0.74rem !important;
    line-height: 1.5 !important;
    color: #697586 !important;
    border: none !important;
}

.docs-content .docs-mockup a {
    color: var(--primary-color) !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    border: none !important;
}

.docs-content .docs-mockup table {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* Light reset for generic elements — only reset properties that could 
   inherit from parent .docs-content rules. Since .docs-content does NOT
   have explicit rules for div/span/label/th/td/tr, we only need minimal
   resets here. We intentionally do NOT reset padding/border/background
   because those are set by mockup component classes (.mock-btn, .input, etc.) */
.docs-content .docs-mockup div,
.docs-content .docs-mockup span,
.docs-content .docs-mockup label {
    text-decoration: none;
    list-style: none;
}

/* ── Mockup Container — Browser Window Chrome ── */
.docs-mockup {
    border: 1px solid #dde3ea !important;
    border-radius: 14px;
    margin: 28px 0;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04), 0 8px 32px rgba(0,0,0,0.07);
    transition: box-shadow 0.35s ease, transform 0.35s ease;
    position: relative;
    display: block !important;
}

.docs-mockup:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.06), 0 12px 40px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* ── Title bar (macOS style dots) ── */
.docs-mockup-bar {
    background: linear-gradient(180deg, #f7f7fa 0%, #ededf2 100%);
    padding: 10px 16px;
    display: flex !important;
    align-items: center;
    gap: 7px;
    border-bottom: 1px solid #dde3ea;
    position: relative;
    min-height: 38px;
}

.docs-mockup-bar .dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block !important;
    flex-shrink: 0;
}

.docs-mockup-bar .dot.red   { background: #ff5f57; box-shadow: 0 0 0 0.5px rgba(0,0,0,0.08); }
.docs-mockup-bar .dot.yellow { background: #febc2e; box-shadow: 0 0 0 0.5px rgba(0,0,0,0.08); }
.docs-mockup-bar .dot.green  { background: #28c840; box-shadow: 0 0 0 0.5px rgba(0,0,0,0.08); }

.docs-mockup-bar .title {
    font-size: 0.7rem;
    color: #8b95a5;
    margin-inline-start: 10px;
    font-weight: 500;
    letter-spacing: 0.15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Mockup body area ── */
.docs-mockup-body {
    padding: 24px !important;
    min-height: 200px;
    background: #ffffff;
    font-family: 'Poppins', 'Cairo', -apple-system, sans-serif;
    font-size: 0.78rem;
    line-height: 1.5;
    color: #3a4553;
    position: relative;
}

html[dir="rtl"] .docs-mockup-body {
    font-family: 'Cairo', 'Poppins', -apple-system, sans-serif;
}

/* Inner headings inside mockups */
.docs-mockup-body h2,
.docs-mockup-body h3,
.docs-mockup-body h4 {
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
    color: #1a2332 !important;
    line-height: 1.3 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    border-bottom: none !important;
}

/* Inner paragraphs inside mockups */
.docs-mockup-body p {
    font-size: 0.74rem !important;
    line-height: 1.5 !important;
    margin: 0 0 4px !important;
    padding: 0 !important;
    color: #697586 !important;
}

/* Inner lists inside mockups */
.docs-mockup-body ul,
.docs-mockup-body ol {
    padding-left: 16px !important;
    padding-right: 0 !important;
    margin: 0 0 6px !important;
    list-style: disc !important;
}

html[dir="rtl"] .docs-mockup-body ul,
html[dir="rtl"] .docs-mockup-body ol {
    padding-left: 0 !important;
    padding-right: 16px !important;
}

.docs-mockup-body li {
    font-size: 0.74rem !important;
    line-height: 1.5 !important;
    margin-bottom: 2px !important;
    color: #697586 !important;
}

.docs-mockup-body a {
    color: var(--primary-color) !important;
    font-weight: 500 !important;
}

/* Inner tables inherit mockup styles not docs-content */
.docs-mockup-body table {
    margin: 0 !important;
    padding: 0 !important;
}

/* Inner icons in mockup */
.docs-mockup-body i,
.docs-mockup-body .fas,
.docs-mockup-body .far,
.docs-mockup-body .fab {
    display: inline-block !important;
    font-style: normal;
    vertical-align: middle;
}

/* ── Phone mockup body isolation ── */
.docs-content .docs-mockup .mock-phone-screen p,
.docs-content .docs-mockup .mock-phone-screen div,
.docs-content .docs-mockup .mock-phone-screen span,
.docs-content .docs-mockup .mock-phone-screen label,
.docs-content .docs-mockup .mock-phone-screen i {
    margin: 0;
    padding: 0;
    border: none;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

/* =======================================================================
   STAT CARDS — Dashboard Statistics Row
   ======================================================================= */
.mock-stats {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
    padding: 0 !important;
}

.mock-stat-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.mock-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #60a5fa);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.mock-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.mock-stat-card:hover::before {
    opacity: 1;
}

.mock-stat-card .icon {
    font-size: 1.5rem !important;
    margin-bottom: 8px !important;
    color: var(--primary-color);
    display: block !important;
}

.mock-stat-card .icon i {
    color: inherit;
    font-size: inherit !important;
}

.mock-stat-card .value {
    font-size: 1.5rem !important;
    font-weight: 800;
    color: #1a2332;
    line-height: 1 !important;
    display: block !important;
}

.mock-stat-card .label {
    font-size: 0.67rem !important;
    color: #8b95a5;
    margin-top: 5px !important;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    display: block !important;
}

/* =======================================================================
   DATA TABLE — List/Grid Views
   ======================================================================= */
.mock-table {
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0;
    font-size: 0.76rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.mock-table th {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 11px 14px;
    text-align: start;
    font-weight: 700;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.mock-table td {
    padding: 11px 14px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    color: #475569;
    vertical-align: middle !important;
    font-size: 0.76rem;
    font-weight: 400;
    background: transparent;
}

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

.mock-table tr:hover td {
    background: rgba(49, 126, 216, 0.03);
}

.mock-table td i {
    vertical-align: middle !important;
}

/* =======================================================================
   FORM — Input Fields & Labels
   ======================================================================= */
.mock-form {
    display: flex !important;
    flex-direction: column;
    gap: 14px;
    max-width: 440px;
    padding: 0 !important;
}

.mock-field {
    display: flex !important;
    flex-direction: column;
    gap: 6px;
    padding: 0 !important;
}

.mock-field label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #475569;
    display: flex !important;
    align-items: center;
    gap: 5px;
    line-height: 1.3;
}

.mock-field label i {
    font-size: 0.7rem;
    color: #94a3b8;
    width: 14px;
    text-align: center;
}

.mock-field .input {
    border: 1.5px solid #e2e8f0;
    border-radius: 9px;
    padding: 10px 14px;
    font-size: 0.76rem;
    color: #94a3b8;
    background: #f8fafc;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    line-height: 1.4;
    display: block !important;
}

.mock-field .input.filled {
    color: #334155;
    background: #ffffff;
    border-color: #cbd5e1;
}

.mock-field-row {
    display: flex !important;
    gap: 12px;
    padding: 0 !important;
}

.mock-field-row .mock-field {
    flex: 1;
    min-width: 0;
}

@media (max-width: 480px) {
    .mock-field-row {
        flex-direction: column !important;
    }
}

/* =======================================================================
   BUTTONS
   ======================================================================= */
.mock-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center;
    gap: 7px !important;
    padding: 10px 22px;
    border-radius: 9px !important;
    font-size: 0.76rem;
    font-weight: 600;
    border: none !important;
    cursor: default !important;
    width: fit-content;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease !important;
    text-decoration: none !important;
    line-height: 1.3;
    white-space: nowrap;
    letter-spacing: 0.15px;
}

.mock-btn:hover {
    transform: translateY(-1px) !important;
    filter: brightness(1.05) !important;
}

.mock-btn.primary {
    background: linear-gradient(135deg, #317ed8 0%, #1d589d 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(49,126,216,0.25);
}

.mock-btn.primary:hover {
    box-shadow: 0 4px 16px rgba(49,126,216,0.35) !important;
}

.mock-btn.success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(34,197,94,0.25);
}

.mock-btn.success:hover {
    box-shadow: 0 4px 16px rgba(34,197,94,0.35) !important;
}

.mock-btn.outline {
    background: #ffffff;
    border: 1.5px solid #d1d5db !important;
    color: #6b7280;
}

.mock-btn.outline:hover {
    border-color: #9ca3af !important;
    background: #f9fafb !important;
}

.mock-btn i {
    font-size: 0.72rem !important;
}

/* =======================================================================
   STATUS BADGES
   ======================================================================= */
.mock-badge {
    display: inline-block !important;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.3px;
    line-height: 1.4;
    vertical-align: middle;
}

.mock-badge.green  { background: #dcfce7; color: #166534; }
.mock-badge.yellow { background: #fef3c7; color: #92400e; }
.mock-badge.red    { background: #fee2e2; color: #991b1b; }
.mock-badge.blue   { background: #dbeafe; color: #1e40af; }
.mock-badge.gray   { background: #f1f5f9; color: #475569; }

/* =======================================================================
   PHONE MOCKUP — Mobile App Screens
   ======================================================================= */
.mock-phone {
    width: 250px;
    margin: 0 auto;
    border: 3px solid #1a2332;
    border-radius: 36px;
    overflow: hidden;
    background: #ffffff;
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.05),
        0 10px 40px rgba(0,0,0,0.15),
        0 2px 10px rgba(0,0,0,0.1);
    display: block !important;
}

.mock-phone-notch {
    background: #1a2332;
    padding: 8px 0 5px;
    text-align: center;
    display: block !important;
}

.mock-phone-notch .notch {
    display: inline-block !important;
    width: 70px;
    height: 6px;
    background: #3a4553;
    border-radius: 3px;
}

.mock-phone-screen {
    padding: 18px;
    min-height: 320px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 40%);
    font-family: 'Poppins', 'Cairo', -apple-system, sans-serif;
    font-size: 0.74rem;
    line-height: 1.4;
    color: #3a4553;
    display: block !important;
}

html[dir="rtl"] .mock-phone-screen {
    font-family: 'Cairo', 'Poppins', -apple-system, sans-serif !important;
}

.mock-phone-screen .app-header {
    text-align: center;
    margin-bottom: 16px;
    padding: 0 !important;
    display: block !important;
}

.mock-phone-screen .app-header i {
    font-size: 2rem;
    color: var(--primary-color);
    display: block !important;
    margin-bottom: 6px;
}

.mock-phone-screen .app-header .app-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: #1a2332;
    display: block !important;
}

/* Phone action grid */
.mock-phone-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px;
    margin: 12px 0;
    padding: 0 !important;
}

.mock-phone-action {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 8px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: block !important;
}

.mock-phone-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.mock-phone-action i {
    font-size: 1.3rem;
    color: var(--primary-color);
    display: block !important;
    margin-bottom: 6px;
}

.mock-phone-action span {
    font-size: 0.64rem;
    color: #64748b;
    font-weight: 600;
    display: block !important;
    line-height: 1.2;
}

/* ── Check-in Circle Button ── */
.mock-checkin-btn {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: linear-gradient(145deg, #317ed8, #1a5fb4);
    color: #ffffff;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    box-shadow:
        0 4px 20px rgba(49,126,216,0.4),
        0 0 0 6px rgba(49,126,216,0.12);
    animation: mockCheckinPulse 2.5s ease-in-out infinite;
    position: relative;
}

@keyframes mockCheckinPulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(49,126,216,0.4), 0 0 0 6px rgba(49,126,216,0.12);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 6px 30px rgba(49,126,216,0.55), 0 0 0 10px rgba(49,126,216,0.08);
        transform: scale(1.03);
    }
}

.mock-checkin-btn i {
    font-size: 1.8rem;
    color: #ffffff;
    display: block !important;
}

.mock-checkin-btn span {
    font-size: 0.62rem;
    margin-top: 4px;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block !important;
}

/* =======================================================================
   CAPTION — Below Mockup Illustrations
   ======================================================================= */
.docs-mockup-caption {
    text-align: center;
    padding: 11px 16px;
    font-size: 0.72rem;
    color: #8b95a5;
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
    border-top: 1px solid #e2e8f0;
    font-style: italic;
    font-weight: 400;
    line-height: 1.4;
    display: block !important;
}

.docs-mockup-caption i {
    color: #94a3b8;
    font-size: 0.68rem;
    margin-inline-end: 4px;
}

/* =======================================================================
   CHART BARS — Mini Bar Charts
   ======================================================================= */
.mock-chart-bars {
    display: flex !important;
    align-items: flex-end;
    gap: 8px;
    height: 90px;
    margin: 16px 0 24px;
    padding: 0 4px;
    border-bottom: 2px solid #e2e8f0;
}

.mock-chart-bar {
    flex: 1;
    border-radius: 6px 6px 0 0;
    min-width: 22px;
    position: relative;
    transition: filter 0.2s ease;
    background: linear-gradient(180deg, #317ed8, #2563a8);
}

.mock-chart-bar:hover {
    filter: brightness(1.1);
}

.mock-chart-bar span {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.58rem;
    color: #8b95a5;
    white-space: nowrap;
    font-weight: 500;
    display: block !important;
}

/* =======================================================================
   MAP MOCKUP — Geofence Illustration
   ======================================================================= */
.mock-map {
    background:
        linear-gradient(135deg, #ecfdf5 0%, #d1fae5 40%, #a7f3d0 100%);
    border-radius: 12px;
    height: 110px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px solid #a7f3d0;
    overflow: hidden;
}

.mock-map::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 50%, rgba(255,255,255,0.3) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(255,255,255,0.2) 0%, transparent 40%);
}

.mock-map i {
    font-size: 2.2rem;
    color: #ef4444;
    filter: drop-shadow(0 2px 4px rgba(239,68,68,0.3));
    z-index: 1;
    position: relative;
}

.mock-map .radius {
    position: absolute;
    width: 65px;
    height: 65px;
    border: 2px dashed rgba(49,126,216,0.35);
    border-radius: 50%;
    background: rgba(49,126,216,0.06);
    animation: mockRadiusPulse 3s ease-in-out infinite;
}

@keyframes mockRadiusPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.7; }
}

/* =======================================================================
   RESPONSIVE — Mockup Adjustments for Small Screens
   ======================================================================= */
@media (max-width: 768px) {
    .docs-mockup-body {
        padding: 16px !important;
    }

    .mock-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
    }

    .mock-stat-card {
        padding: 12px 8px;
    }

    .mock-stat-card .value {
        font-size: 1.2rem;
    }

    .mock-table {
        font-size: 0.7rem;
    }

    .mock-table th,
    .mock-table td {
        padding: 8px 10px;
    }

    .mock-form {
        max-width: 100%;
    }

    .mock-phone {
        width: 220px;
    }
}

@media (max-width: 480px) {
    .docs-mockup-body {
        padding: 12px !important;
    }

    .mock-stats {
        grid-template-columns: 1fr 1fr !important;
    }

    .mock-field-row {
        flex-direction: column !important;
        gap: 12px;
    }

    .mock-chart-bars {
        height: 60px;
    }
}

/* ===== CHECKLIST ===== */
.docs-checklist {
    list-style: none;
    padding: 0;
    margin: 16px 0;
}

.docs-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.93rem;
    color: var(--gray-600);
}

.docs-checklist li::before {
    content: '\f0c8';
    font-family: 'Font Awesome 6 Free';
    font-weight: 400;
    color: var(--gray-400);
    flex-shrink: 0;
    margin-top: 2px;
}

.docs-checklist li.checked::before {
    content: '\f14a';
    font-weight: 900;
    color: var(--success-color);
}

/* ===== PREV/NEXT NAVIGATION ===== */
.docs-nav-prev-next {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

.docs-nav-prev,
.docs-nav-next {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-decoration: none;
    padding: 16px 20px;
    border: 1px solid var(--gray-200);
    border-radius: var(--docs-radius);
    transition: var(--docs-transition);
    max-width: 48%;
}

.docs-nav-prev:hover,
.docs-nav-next:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

.docs-nav-next {
    align-items: flex-end;
    text-align: right;
    margin-left: auto;
}

html[dir="rtl"] .docs-nav-next {
    text-align: left;
    margin-left: 0;
    margin-right: auto;
}

.docs-nav-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-400);
}

.docs-nav-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 6px;
}


/* ===== RELATED TOPICS ===== */
.docs-related-topics {
    margin-top: 48px;
    padding: 24px;
    background: var(--light-blue, #f8fbff);
    border-radius: var(--docs-radius, 10px);
    border: 1px solid var(--gray-200, #e8ecf1);
}

.docs-related-topics-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark, #1a1a2e);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.docs-related-topics-title i {
    color: var(--primary-color, #317ed8);
}

.docs-related-topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.docs-related-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid var(--gray-200, #e8ecf1);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dark, #1a1a2e);
    font-size: 0.88rem;
    font-weight: 500;
    transition: var(--docs-transition, all 0.2s ease);
}

.docs-related-link:hover {
    border-color: var(--primary-color, #317ed8);
    box-shadow: 0 2px 8px rgba(49, 126, 216, 0.12);
    color: var(--primary-color, #317ed8);
    text-decoration: none;
    transform: translateY(-1px);
}

.docs-related-link i {
    font-size: 1rem;
    color: var(--primary-color, #317ed8);
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

html[dir="rtl"] .docs-related-link {
    flex-direction: row-reverse;
    text-align: right;
}

html[dir="rtl"] .docs-related-topics-title {
    flex-direction: row-reverse;
}

@media (max-width: 768px) {
    .docs-related-topics-grid {
        grid-template-columns: 1fr;
    }
    .docs-related-topics {
        padding: 16px;
    }
}

@media print {
    .docs-related-topics {
        break-inside: avoid;
        border: 1px solid #ccc;
    }
}

/* ===== HOME HERO (Larger) ===== */
.docs-home-hero {
    background: var(--gradient-primary);
    padding: 50px 40px 60px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.docs-home-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
}

.docs-home-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -5%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
}

.docs-home-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.docs-home-hero p {
    font-size: 1.05rem;
    opacity: 0.9;
    max-width: 550px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Quick Start Banner */
.docs-quick-start {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--docs-radius);
    padding: 28px;
    margin-bottom: 32px;
}

.docs-quick-start h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.docs-quick-start h3 i {
    color: var(--primary-color);
}

/* ===== IMPORTANT NOTICE (Admin Warning) ===== */
.docs-important-notice {
    background: linear-gradient(135deg, #fff3e0 0%, #fff8e5 100%);
    border: 2px solid #ffb74d;
    border-radius: var(--docs-radius);
    padding: 24px 28px;
    margin: 24px 0;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.docs-important-notice-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ff9800;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.docs-important-notice h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #e65100;
    margin: 0 0 8px;
}

.docs-important-notice p {
    font-size: 0.9rem;
    color: #bf360c;
    margin: 0 0 4px;
    line-height: 1.7;
}

.docs-important-notice ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

html[dir="rtl"] .docs-important-notice ul {
    padding-left: 0;
    padding-right: 20px;
}

.docs-important-notice li {
    font-size: 0.88rem;
    color: #bf360c;
    margin-bottom: 4px;
}

/* ===== SECTION CATEGORY LABEL ===== */
.docs-section-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.docs-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

/* ===== FOOTER MATCHING LEGAL FOOTER ===== */
.docs-footer {
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    padding: 24px 40px;
    text-align: center;
}

.docs-footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 10px;
}

.docs-footer-links a {
    color: var(--gray-500);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s;
}

.docs-footer-links a:hover {
    color: var(--primary-color);
}

.docs-footer p {
    color: var(--gray-400);
    font-size: 0.8rem;
}

/* ===== RESPONSIVE ===== */

/* Tablet: hide TOC */
@media (max-width: 1200px) {
    .docs-toc {
        display: none;
    }
}

/* Tablet: sidebar overlay */
@media (max-width: 992px) {
    .docs-sidebar {
        transform: translateX(-100%);
        box-shadow: none;
        z-index: 500;
    }

    html[dir="rtl"] .docs-sidebar {
        transform: translateX(100%);
    }

    .docs-sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.12);
    }

    html[dir="rtl"] .docs-sidebar.open {
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.12);
    }

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

    .docs-mobile-sidebar-toggle {
        display: flex;
    }

    .docs-main {
        margin-left: 0;
    }

    html[dir="rtl"] .docs-main {
        margin-right: 0;
    }

    .docs-content {
        padding: 24px;
    }

    .docs-hero {
        padding: 28px 24px;
    }

    .docs-breadcrumb {
        padding: 12px 24px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .docs-home-hero h1 {
        font-size: 1.6rem;
    }

    .docs-hero h1 {
        font-size: 1.4rem;
    }

    .docs-content h2 {
        font-size: 1.25rem;
    }

    .docs-quick-links {
        grid-template-columns: 1fr;
    }

    .docs-nav-prev-next {
        flex-direction: column;
    }

    .docs-nav-prev,
    .docs-nav-next {
        max-width: 100%;
    }

    .docs-important-notice {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .docs-important-notice ul {
        text-align: start;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .docs-content {
        padding: 16px;
    }

    .docs-hero {
        padding: 24px 16px;
    }

    .docs-breadcrumb {
        padding: 10px 16px;
        font-size: 0.75rem;
    }

    .docs-card {
        padding: 16px;
    }

    .docs-step {
        gap: 12px;
    }

    .docs-step-number {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .docs-step:not(:last-child)::after {
        left: 15px;
    }

    html[dir="rtl"] .docs-step:not(:last-child)::after {
        left: auto;
        right: 15px;
    }

    .docs-search-bar input {
        padding: 14px 16px 14px 42px;
        font-size: 0.9rem;
    }

    html[dir="rtl"] .docs-search-bar input {
        padding: 14px 42px 14px 16px;
    }

    .docs-home-hero {
        padding: 36px 16px 44px;
    }

    .docs-footer {
        padding: 20px 16px;
    }
}

/* ===== PRINT ===== */
@media print {
    .docs-sidebar,
    .docs-mobile-sidebar-toggle,
    .docs-sidebar-overlay,
    .docs-toc,
    .docs-nav-prev-next,
    .docs-search-bar,
    .docs-breadcrumb,
    .header,
    .docs-footer,
    .wa-chat-widget {
        display: none !important;
    }

    .docs-layout {
        display: block;
        padding-top: 0;
    }

    .docs-main {
        margin: 0 !important;
    }

    .docs-content {
        padding: 0;
        max-width: 100%;
    }

    .docs-hero {
        background: none !important;
        color: #000 !important;
        padding: 0 0 12px;
        border-bottom: 2px solid #000;
        margin-bottom: 20px;
    }

    .docs-hero h1 {
        color: #000;
        font-size: 1.5rem;
    }

    .docs-tip,
    .docs-warning,
    .docs-danger,
    .docs-example {
        border-width: 2px;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .docs-quick-links {
        grid-template-columns: repeat(2, 1fr);
    }
}
