:root {
    --bg-dark: #0f172a;
    --surface-dark: #1e293b;
    --surface-hover: #334155;
    --border-color: #334155;
    --primary: #38bdf8;
    --primary-hover: #0284c7;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #34d399;
    --danger: #f87171;
    --warning: #fbbf24;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    background-color: var(--surface-dark);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-brand {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.nav-brand svg { stroke: var(--primary); }
.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.nav-item {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.nav-item:hover { color: var(--primary); }
.nav-logout { color: var(--danger); }
.user-pill {
    background: rgba(51, 65, 85, 0.6);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    color: var(--primary);
}

.main-content {
    flex: 1;
    padding: 2rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.footer {
    background: var(--surface-dark);
    border-top: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.card {
    background: var(--surface-dark);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
}

.form-container {
    max-width: 700px;
    margin: 1.5rem auto;
}

.auth-box {
    max-width: 440px;
    margin: 3rem auto;
}
.auth-box h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #fff;
}
.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}
.form-group {
    margin-bottom: 1.25rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #cbd5e1;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: #0f172a;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.15s ease;
    font-family: inherit;
}
.form-group textarea { resize: vertical; }
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); }
.hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.35rem; display: block; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.25rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.15s ease;
}
.btn-primary { background: var(--primary); color: #0f172a; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-success { background: var(--success); color: #0f172a; }
.btn-danger { background: var(--danger); color: #0f172a; }
.btn-neutral { background: #334155; color: #f8fafc; }
.btn-neutral:hover { background: #475569; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn-block { width: 100%; }

.alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}
.alert-error { background: rgba(248, 113, 113, 0.1); border: 1px solid var(--danger); color: var(--danger); }
.alert-success { background: rgba(52, 211, 153, 0.1); border: 1px solid var(--success); color: var(--success); }

.badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
}
.badge-pending {
    background: var(--warning);
    color: #0f172a;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.1rem 0.45rem;
    border-radius: 9999px;
    margin-left: 0.25rem;
}
.badge-primary { background: rgba(56, 189, 248, 0.15); color: var(--primary); }
.badge-success { background: rgba(52, 211, 153, 0.15); color: var(--success); }
.badge-warning { background: rgba(251, 191, 36, 0.15); color: var(--warning); }
.badge-danger { background: rgba(248, 113, 113, 0.15); color: var(--danger); }
.badge-neutral { background: rgba(148, 163, 184, 0.15); color: var(--text-muted); }

.file-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}
.file-badge-txt { background: #334155; color: #94a3b8; }
.file-badge-docx { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.4); }
.file-badge-pptx { background: rgba(249, 115, 22, 0.2); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.4); }
.file-badge-pdf { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }

.sop-header, .sop-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.sop-view-actions {
    display: flex;
    gap: 0.75rem;
}
.sop-title-link {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
}
.sop-title-link:hover {
    color: var(--primary);
    text-decoration: underline;
}
.sop-desc-preview {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}
.action-cell {
    white-space: nowrap;
    display: flex;
    gap: 0.4rem;
}
.search-bar-box {
    background: var(--surface-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
}
.search-form {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}
.search-form input {
    flex: 1;
    padding: 0.65rem 0.85rem;
    background: #0f172a;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: #fff;
    font-size: 0.95rem;
}
.sop-desc-box {
    background: var(--surface-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}
.sop-desc-box h3 { font-size: 1rem; color: var(--primary); margin-bottom: 0.5rem; }
.sop-desc-box p { color: #cbd5e1; line-height: 1.5; font-size: 0.95rem; }

.extracted-text-box {
    background: var(--surface-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}
.extracted-text-header {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.4);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.extracted-text-header h3 { font-size: 1rem; color: #fff; }
.extracted-text-content {
    padding: 1.25rem;
    max-height: 600px;
    overflow-y: auto;
}
.extracted-text-content pre {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #cbd5e1;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.data-table th, .data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
.data-table th {
    background: rgba(15, 23, 42, 0.4);
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.data-table tr:hover { background: rgba(51, 65, 85, 0.2); }
.empty-state { color: var(--text-muted); font-size: 0.9rem; padding: 1.5rem 0; text-align: center; font-style: italic; }
.table-responsive { overflow-x: auto; }

/* NOTEPAD++ BROWSER EDITOR STYLES */
.notepad-wrapper {
    background: #1e1e1e;
    border: 1px solid #334155;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 170px);
    min-height: 550px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    overflow: hidden;
}

.notepad-toolbar {
    background: #252526;
    border-bottom: 1px solid #333;
    padding: 0.4rem 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.notepad-toolbar-left {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}
.notepad-toolbar-right {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}
.np-btn {
    background: #333333;
    color: #cccccc;
    border: 1px solid #444;
    padding: 0.3rem 0.65rem;
    font-size: 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
    transition: all 0.15s ease;
}
.np-btn:hover {
    background: #444444;
    color: #ffffff;
    border-color: #555;
}
.status-indicator {
    font-size: 0.75rem;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
}
.status-saved { background: rgba(52, 211, 153, 0.15); color: #34d399; }
.status-saving { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.status-unsaved { background: rgba(248, 113, 113, 0.15); color: #f87171; }
.status-loading { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.privacy-badge {
    font-size: 0.75rem;
    color: #94a3b8;
    background: #18181b;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    border: 1px solid #27272a;
}

/* TABS */
.notepad-tab-bar {
    background: #18181b;
    border-bottom: 1px solid #27272a;
    display: flex;
    align-items: center;
    overflow-x: auto;
    padding: 0 0.5rem;
    scrollbar-width: thin;
}
.notepad-tab {
    background: #27272a;
    color: #a1a1aa;
    border-top: 2px solid transparent;
    border-right: 1px solid #18181b;
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: all 0.15s ease;
}
.notepad-tab:hover {
    background: #3f3f46;
    color: #f4f4f5;
}
.notepad-tab.active {
    background: #1e1e1e;
    color: #38bdf8;
    border-top-color: #38bdf8;
}
.tab-icon { font-size: 0.8rem; }
.tab-close {
    background: none;
    border: none;
    color: #71717a;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.2rem;
    border-radius: 3px;
}
.tab-close:hover {
    color: #f87171;
    background: rgba(248, 113, 113, 0.2);
}
.tab-add-btn {
    background: none;
    border: none;
    color: #a1a1aa;
    font-size: 1.1rem;
    padding: 0.35rem 0.65rem;
    cursor: pointer;
}
.tab-add-btn:hover { color: #38bdf8; }

/* FIND & REPLACE BAR */
.find-replace-bar {
    background: #2d2d30;
    border-bottom: 1px solid #3e3e42;
    padding: 0.6rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.82rem;
}
.fr-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.fr-field {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.fr-field label { color: #aaa; min-width: 55px; }
.fr-field input {
    background: #1e1e1e;
    border: 1px solid #3e3e42;
    color: #eee;
    padding: 0.25rem 0.5rem;
    font-size: 0.82rem;
    border-radius: 3px;
    width: 200px;
    outline: none;
}
.fr-field input:focus { border-color: #38bdf8; }
.fr-options {
    display: flex;
    gap: 0.75rem;
    color: #aaa;
    margin-left: 0.5rem;
}
.fr-options label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
}
.find-count { color: #38bdf8; font-size: 0.8rem; margin-left: 0.5rem; }
.fr-close {
    background: none;
    border: none;
    color: #888;
    font-size: 1.25rem;
    margin-left: auto;
    cursor: pointer;
}
.fr-close:hover { color: #fff; }

/* EDITOR BODY & GUTTER */
.notepad-editor-container {
    flex: 1;
    display: flex;
    background: #1e1e1e;
    overflow: hidden;
    position: relative;
}
.line-gutter {
    width: 50px;
    background: #1e1e1e;
    border-right: 1px solid #2d2d30;
    color: #858585;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    padding: 0.75rem 0.5rem 0.75rem 0.25rem;
    text-align: right;
    user-select: none;
    overflow: hidden;
}
.notepad-textarea {
    flex: 1;
    background: #1e1e1e;
    color: #d4d4d4;
    border: none;
    outline: none;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    padding: 0.75rem 0.85rem;
    resize: none;
    white-space: pre;
    overflow: auto;
    tab-size: 4;
}

/* STATUSBAR */
.notepad-statusbar {
    background: #007acc;
    color: #ffffff;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.sb-left, .sb-right {
    display: flex;
    gap: 1.25rem;
}

/* MODAL */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal-content {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 2rem;
    max-width: 480px;
    width: 90%;
}

/* SNIPPETS LIBRARY STYLES */
.snippets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.25rem;
}

.snippet-card {
    background: var(--surface-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.snippet-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}
.snippet-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.65rem;
    gap: 0.5rem;
}
.snippet-card-title {
    font-size: 1.05rem;
    font-weight: 700;
}
.snippet-card-title a {
    color: #fff;
    text-decoration: none;
}
.snippet-card-title a:hover {
    color: var(--primary);
}
.snippet-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.85rem;
    line-height: 1.4;
}
.snippet-code-preview {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 6px;
    padding: 0.75rem;
    max-height: 160px;
    overflow: hidden;
    margin-bottom: 1rem;
}
.snippet-code-preview pre {
    margin: 0;
    font-family: Consolas, Monaco, monospace;
    font-size: 0.82rem;
    color: #cbd5e1;
    white-space: pre-wrap;
    word-break: break-all;
}
.snippet-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid #334155;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.snippet-tags {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}
.snippet-actions {
    display: flex;
    gap: 0.35rem;
}

.lang-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-block;
}
.lang-badge-bash { background: rgba(34, 197, 94, 0.15); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); }
.lang-badge-php { background: rgba(139, 92, 246, 0.15); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.3); }
.lang-badge-python { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }
.lang-badge-sql { background: rgba(249, 115, 22, 0.15); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.3); }
.lang-badge-javascript { background: rgba(234, 179, 8, 0.15); color: #facc15; border: 1px solid rgba(234, 179, 8, 0.3); }
.lang-badge-html { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.lang-badge-css { background: rgba(14, 165, 233, 0.15); color: #38bdf8; border: 1px solid rgba(14, 165, 233, 0.3); }
.lang-badge-json { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.lang-badge-ini { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.3); }
.lang-badge-text { background: #334155; color: #94a3b8; }

.filter-pill {
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.78rem;
    background: #0f172a;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: all 0.15s ease;
}
.filter-pill:hover, .filter-pill.active {
    background: var(--primary);
    color: #0f172a;
    font-weight: 700;
}
.tag-pill {
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    background: rgba(56, 189, 248, 0.1);
    color: var(--primary);
    border: 1px solid rgba(56, 189, 248, 0.2);
    text-decoration: none;
}
.tag-pill:hover, .tag-pill.active {
    background: var(--primary);
    color: #0f172a;
}
.tag-badge {
    font-size: 0.75rem;
    color: var(--primary);
    background: rgba(56, 189, 248, 0.1);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    text-decoration: none;
}

.code-viewer-box {
    background: #0f172a;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}
.code-viewer-header {
    background: rgba(30, 41, 59, 0.8);
    padding: 0.65rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    font-weight: 600;
    color: #cbd5e1;
}
.code-viewer-body {
    padding: 1.25rem;
    overflow-x: auto;
}
.code-block {
    margin: 0;
    font-family: Consolas, Monaco, monospace;
    font-size: 0.92rem;
    line-height: 1.6;
    color: #f1f5f9;
}

/* STAGE 7: GLOBAL SEARCH & DASHBOARD STYLES */
.dashboard-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.dashboard-hero {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.95));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.hero-content h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.hero-search-form {
    max-width: 760px;
    margin: 1.75rem auto 0;
}

.hero-search-box {
    display: flex;
    align-items: center;
    background: #0f172a;
    border: 2px solid #334155;
    border-radius: 8px;
    padding: 0.35rem 0.5rem 0.35rem 1rem;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: border-color 0.15s ease;
}
.hero-search-box:focus-within {
    border-color: var(--primary);
}
.hero-search-box .search-icon {
    color: #94a3b8;
    flex-shrink: 0;
}
.hero-search-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1rem;
    color: #f8fafc;
}
.hero-search-box input::placeholder {
    color: #64748b;
}

.hero-search-filters {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.search-filter-chip {
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 600;
    background: rgba(30, 41, 59, 0.9);
    color: #cbd5e1;
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: all 0.15s ease;
}
.search-filter-chip:hover, .search-filter-chip.active {
    background: var(--primary);
    color: #0f172a;
    border-color: var(--primary);
}
.btn-clear-search {
    color: #f87171;
    font-size: 0.82rem;
    margin-left: 0.5rem;
    text-decoration: none;
    padding: 0.35rem 0.65rem;
}
.btn-clear-search:hover {
    text-decoration: underline;
}

/* SEARCH RESULTS LIST */
.search-results-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}
.results-header h2 {
    font-size: 1.35rem;
}
.results-count {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.result-card {
    background: var(--surface-dark);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.result-card:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}
.result-type-sop { border-left-color: #38bdf8; }
.result-type-note { border-left-color: #34d399; }
.result-type-snippet { border-left-color: #f59e0b; }

.result-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.result-title {
    font-size: 1.15rem;
    margin: 0;
    flex: 1;
}
.result-title a {
    color: #f8fafc;
    text-decoration: none;
}
.result-title a:hover {
    color: var(--primary);
}
.result-type-tag {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: #0f172a;
    border: 1px solid #334155;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}
.result-excerpt {
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1.5;
    background: #0f172a;
    padding: 0.65rem 0.85rem;
    border-radius: 6px;
    font-family: Consolas, "Courier New", monospace;
}
.search-highlight {
    background: #eab308;
    color: #0f172a;
    font-weight: 700;
    padding: 0.1rem 0.25rem;
    border-radius: 3px;
}
.result-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* STAT TILES */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}
.stat-tile {
    background: var(--surface-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.stat-tile-admin {
    border-color: rgba(248, 113, 113, 0.4);
    background: rgba(239, 68, 68, 0.05);
}
.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: #f8fafc;
    line-height: 1;
}
.stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}
.stat-link {
    margin-top: 0.5rem;
    font-size: 0.82rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}
.stat-link:hover {
    text-decoration: underline;
}

/* QUICK ACTION BAR */
.quick-actions-bar {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.action-btn {
    flex: 1;
    min-width: 200px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 0.85rem 1.25rem;
    color: #f8fafc;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.15s ease;
}
.action-btn:hover {
    background: #334155;
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* THREE-COLUMN ACTIVITY GRID */
.dashboard-activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}
.activity-card {
    background: var(--surface-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}
.activity-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--border-color);
}
.activity-card-header h3 {
    font-size: 1rem;
    margin: 0;
}
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.activity-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.4rem 0;
}
.activity-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.activity-title {
    color: #f8fafc;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.activity-title:hover {
    color: var(--primary);
}
.activity-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* STAGE 7: GLOBAL SEARCH & DASHBOARD STYLES */
.dashboard-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.dashboard-hero {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.95));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.hero-content h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.hero-search-form {
    max-width: 760px;
    margin: 1.75rem auto 0;
}

.hero-search-box {
    display: flex;
    align-items: center;
    background: #0f172a;
    border: 2px solid #334155;
    border-radius: 8px;
    padding: 0.35rem 0.5rem 0.35rem 1rem;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: border-color 0.15s ease;
}
.hero-search-box:focus-within {
    border-color: var(--primary);
}
.hero-search-box .search-icon {
    color: #94a3b8;
    flex-shrink: 0;
}
.hero-search-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1rem;
    color: #f8fafc;
}
.hero-search-box input::placeholder {
    color: #64748b;
}

.hero-search-filters {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.search-filter-chip {
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 600;
    background: rgba(30, 41, 59, 0.9);
    color: #cbd5e1;
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: all 0.15s ease;
}
.search-filter-chip:hover, .search-filter-chip.active {
    background: var(--primary);
    color: #0f172a;
    border-color: var(--primary);
}
.btn-clear-search {
    color: #f87171;
    font-size: 0.82rem;
    margin-left: 0.5rem;
    text-decoration: none;
    padding: 0.35rem 0.65rem;
}
.btn-clear-search:hover {
    text-decoration: underline;
}

/* SEARCH RESULTS LIST */
.search-results-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}
.results-header h2 {
    font-size: 1.35rem;
}
.results-count {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.result-card {
    background: var(--surface-dark);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.result-card:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}
.result-type-sop { border-left-color: #38bdf8; }
.result-type-note { border-left-color: #34d399; }
.result-type-snippet { border-left-color: #f59e0b; }

.result-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.result-title {
    font-size: 1.15rem;
    margin: 0;
    flex: 1;
}
.result-title a {
    color: #f8fafc;
    text-decoration: none;
}
.result-title a:hover {
    color: var(--primary);
}
.result-type-tag {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: #0f172a;
    border: 1px solid #334155;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}
.result-excerpt {
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1.5;
    background: #0f172a;
    padding: 0.65rem 0.85rem;
    border-radius: 6px;
    font-family: Consolas, "Courier New", monospace;
}
.search-highlight {
    background: #eab308;
    color: #0f172a;
    font-weight: 700;
    padding: 0.1rem 0.25rem;
    border-radius: 3px;
}
.result-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* STAT TILES */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}
.stat-tile {
    background: var(--surface-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.stat-tile-admin {
    border-color: rgba(248, 113, 113, 0.4);
    background: rgba(239, 68, 68, 0.05);
}
.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: #f8fafc;
    line-height: 1;
}
.stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}
.stat-link {
    margin-top: 0.5rem;
    font-size: 0.82rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}
.stat-link:hover {
    text-decoration: underline;
}

/* QUICK ACTION BAR */
.quick-actions-bar {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.action-btn {
    flex: 1;
    min-width: 200px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 0.85rem 1.25rem;
    color: #f8fafc;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.15s ease;
}
.action-btn:hover {
    background: #334155;
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* THREE-COLUMN ACTIVITY GRID */
.dashboard-activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}
.activity-card {
    background: var(--surface-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}
.activity-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--border-color);
}
.activity-card-header h3 {
    font-size: 1rem;
    margin: 0;
}
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.activity-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.4rem 0;
}
.activity-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.activity-title {
    color: #f8fafc;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.activity-title:hover {
    color: var(--primary);
}
.activity-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}


/* ========================================================
   SOP CATEGORY TABS & DEPARTMENT BADGES (USER-FRIENDLY UI)
   ======================================================== */
.category-tabs-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-color);
}
.cat-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 20px;
    background: var(--bg-surface);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}
.cat-tab:hover {
    color: var(--text-main);
    border-color: var(--primary);
    background: var(--bg-hover);
}
.cat-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.cat-pill-count {
    background: rgba(0, 0, 0, 0.25);
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}
.cat-tab.active .cat-pill-count {
    background: rgba(255, 255, 255, 0.25);
}

/* Department Badges */
.dept-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.dept-badge-shiftsupport {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}
.dept-badge-billingdomreg {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}
.dept-badge-networkservicedelivery {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.dept-badge-trustsafetysharedhosting {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.dept-badge-general {
    background: rgba(100, 116, 139, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, 0.3);
}

/* SOP View Step Cards */
.sop-view-container {
    max-width: 1000px;
    margin: 0 auto;
}
.sop-view-header {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.75rem;
}
.sop-breadcrumb a {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: none;
}
.sop-breadcrumb a:hover {
    color: var(--primary);
}
.sop-main-title {
    font-size: 1.65rem;
    font-weight: 700;
    margin: 0.5rem 0 0.25rem 0;
    color: var(--text-main);
}
.sop-desc-subtitle {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}
.sop-action-bar {
    display: flex;
    gap: 10px;
    margin-top: 1.25rem;
    flex-wrap: wrap;
    align-items: center;
}
.view-mode-tabs {
    display: flex;
    gap: 10px;
}
.view-tab {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.view-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Step cards */
.steps-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.step-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.2rem 1.4rem;
    transition: border-color 0.2s;
}
.step-card:hover {
    border-color: rgba(59, 130, 246, 0.4);
}
.step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    background: var(--primary);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 6px;
    min-width: 48px;
    text-align: center;
}
.step-content-col {
    flex: 1;
}
.step-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-main);
}

/* Callout cards */
.notes-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.callout-card {
    border-radius: 8px;
    padding: 1rem 1.25rem;
    border-left: 4px solid;
    background: rgba(255, 255, 255, 0.02);
}
.callout-note {
    border-left-color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
}
.callout-warning, .callout-caution {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}
.callout-alternative, .callout-reference {
    border-left-color: #10b981;
    background: rgba(16, 185, 129, 0.08);
}
.callout-title {
    font-size: 0.9rem;
    margin-bottom: 4px;
    color: var(--text-main);
}
.callout-body {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
}


/* ========================================================
   PROCEDURE FLOW VIEW (CLEAN INLINE STEP FORMAT)
   ======================================================== */
.sop-procedure-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
}
.sop-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}
.sop-flow-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.proc-step-row {
    display: block;
    padding: 0.6rem 0.85rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    line-height: 1.6;
    font-size: 1rem;
    color: var(--text-main);
}
.proc-step-row:hover {
    background: rgba(59, 130, 246, 0.06);
    border-color: rgba(59, 130, 246, 0.3);
}
.proc-step-num {
    font-weight: 700;
    color: #38bdf8;
    margin-right: 6px;
    font-family: inherit;
    letter-spacing: 0.2px;
}
.proc-step-body {
    color: var(--text-main);
}
.proc-callout {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
    background: rgba(59, 130, 246, 0.08);
    margin: 4px 0;
    line-height: 1.5;
}
.proc-callout-warning, .proc-callout-caution {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}
.proc-callout-tag {
    font-weight: 700;
    color: var(--text-main);
    margin-right: 6px;
}
.proc-callout-body {
    color: var(--text-muted);
}
.proc-template-block {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin: 10px 0;
}
.proc-template-block pre {
    margin: 0;
    font-family: Consolas, Monaco, monospace;
    font-size: 0.92rem;
    color: #58a6ff;
    white-space: pre-wrap;
    line-height: 1.6;
}
.proc-text-line {
    padding: 0.35rem 0.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}
.proc-spacer {
    height: 6px;
}

/* ========================================================
   PROFESSIONAL DOCUMENTATION UI/UX (SOP VIEW & STEPS)
   ======================================================== */
.sop-view-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1rem 3rem 1rem;
}

.sop-hero-card {
    background: #161f30;
    border: 1px solid #25334d;
    border-radius: 14px;
    padding: 2rem 2.25rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

.sop-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1.25rem;
    font-size: 0.88rem;
}

.sop-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.sop-back-link:hover {
    color: #38bdf8;
}

.breadcrumb-separator {
    color: #475569;
}

.breadcrumb-dept {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb-dept:hover {
    color: #38bdf8;
}

.sop-meta-pills {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.sop-file-pill {
    background: #0f172a;
    color: #94a3b8;
    border: 1px solid #334155;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.sop-date-pill {
    color: #64748b;
    font-size: 0.82rem;
}

.sop-title-display {
    font-size: 1.95rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.sop-description-lead {
    color: #94a3b8;
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 1.75rem;
}

/* Clickable URLs in SOP description */
.sop-description-lead a.sop-desc-link,
.sop-desc-link {
    color: #60a5fa;
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-all;
    transition: color 0.15s ease;
}

.sop-desc-link:hover {
    color: #93c5fd;
    text-decoration-thickness: 2px;
}

.sop-desc-link:visited {
    color: #a78bfa;
}


.sop-action-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    border-top: 1px solid #25334d;
    padding-top: 1.5rem;
}

.btn-copy-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #0284c7;
    color: #ffffff;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: 8px;
    border: 1px solid #0369a1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-copy-all:hover {
    background: #0369a1;
}

.btn-download-file {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1e293b;
    color: #f1f5f9;
    border: 1px solid #334155;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-download-file:hover {
    background: #334155;
    color: #ffffff;
}

/* Environment Section Banner (e.g. For AIMS/CX2:, For Laxton:) */
.env-section-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.14) 0%, rgba(22, 31, 48, 0.8) 100%);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-left: 5px solid #38bdf8;
    border-radius: 10px;
    padding: 14px 20px;
    margin: 2.5rem 0 1.5rem 0;
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.25);
}

.env-banner-icon {
    color: #38bdf8;
    display: flex;
    align-items: center;
}

.env-banner-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
}

/* Step Cards & Generous Spacing */
.section-step-list {
    display: flex;
    flex-direction: column;
    gap: 22px; /* Generous 22px space between steps! */
}

.pro-step-card {
    background: #161f30;
    border: 1px solid #25334d;
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 4px 8px -2px rgba(0, 0, 0, 0.3);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pro-step-card:hover {
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.45);
}

.pro-step-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.pro-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(56, 189, 248, 0.16);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
    padding: 5px 12px;
    border-radius: 7px;
    font-weight: 800;
    font-size: 0.95rem;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1;
}

.pro-step-headline {
    font-size: 1.08rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.5;
    margin: 0;
    flex: 1;
}

/* Detail Guidance Box (for notes under steps like AIMS/CX2 details) */
.pro-step-guidance-box {
    margin-top: 1.25rem;
    padding: 1.15rem 1.35rem;
    background: #0c121e;
    border: 1px solid #1e2b42;
    border-left: 3px solid #38bdf8;
    border-radius: 8px;
}

.guidance-box-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: #38bdf8;
    margin-bottom: 0.75rem;
}

.guidance-items-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.guidance-item-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.65;
}

.guidance-bullet {
    color: #38bdf8;
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.4;
}

.guidance-text {
    color: #e2e8f0; /* Ultra-clear, readable contrast! */
    font-size: 0.96rem;
    flex: 1;
}

/* Callout Cards (Note, Warning, Caution) */
.pro-callout-card {
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    border-left: 5px solid;
    margin: 1.5rem 0;
    box-shadow: 0 4px 8px -2px rgba(0, 0, 0, 0.25);
}

.pro-callout-note, .pro-callout-info {
    border-left-color: #38bdf8;
    background: rgba(56, 189, 248, 0.08);
}

.pro-callout-warning, .pro-callout-caution {
    border-left-color: #f87171;
    background: rgba(239, 68, 68, 0.08);
}

.pro-callout-alternative, .pro-callout-reference {
    border-left-color: #34d399;
    background: rgba(52, 211, 153, 0.08);
}

.pro-callout-tag-row {
    font-weight: 800;
    font-size: 0.95rem;
    color: #ffffff;
    margin-bottom: 6px;
}

.pro-callout-text {
    color: #e2e8f0;
    font-size: 0.96rem;
    line-height: 1.65;
}

/* Template Code Cards */
.pro-template-card {
    background: #0c121e;
    border: 1px solid #1e2b42;
    border-radius: 10px;
    margin: 1.5rem 0;
    overflow: hidden;
    box-shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.35);
}

.pro-template-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #141c2c;
    border-bottom: 1px solid #1e2b42;
    font-size: 0.85rem;
    color: #94a3b8;
}

.template-header-title {
    font-weight: 600;
    color: #cbd5e1;
}

.btn-copy-template {
    background: #1e293b;
    border: 1px solid #334155;
    color: #e2e8f0;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-copy-template:hover {
    background: #334155;
    color: #ffffff;
}

.template-pre-content {
    padding: 1.25rem 1.5rem;
    margin: 0;
    font-family: 'JetBrains Mono', Consolas, Monaco, monospace;
    font-size: 0.92rem;
    color: #67e8f9;
    white-space: pre-wrap;
    line-height: 1.65;
}

.pro-text-paragraph {
    padding: 0.5rem 0.75rem;
    color: #cbd5e1;
    font-size: 0.98rem;
    line-height: 1.7;
}

.btn-copied-success {
    background-color: #10b981 !important;
    border-color: #10b981 !important;
    color: #ffffff !important;
}


/* ========================================================
   SOP STEP CARD & INLINE FORMAT (1st : <Text> ON SAME LINE)
   ======================================================== */
.section-step-list {
    display: flex;
    flex-direction: column;
    gap: 18px; /* Generous breathing room between step 1, 2, 3 */
    margin-bottom: 1.5rem;
}

.sop-step-card {
    background: #161f30;
    border: 1px solid #25334d;
    border-radius: 12px;
    padding: 1.25rem 1.6rem;
    box-shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.35);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sop-step-card:hover {
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 6px 16px -3px rgba(0, 0, 0, 0.45);
}

.sop-step-line {
    font-size: 1.08rem;
    line-height: 1.65;
    color: #ffffff;
    display: block;
}

.sop-step-tag {
    color: #38bdf8;
    font-weight: 800;
    font-size: 1.08rem;
    display: inline;
    margin-right: 8px;
    letter-spacing: 0.2px;
}

.sop-step-title {
    color: #ffffff;
    font-weight: 600;
    font-size: 1.08rem;
    display: inline;
}

.sop-substep-box {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    background: #0c121e;
    border: 1px solid #1e2b42;
    border-left: 3px solid #38bdf8;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sop-substep-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.65;
}

.sop-substep-bullet {
    color: #38bdf8;
    font-size: 1.1rem;
    line-height: 1.4;
}

.sop-substep-text {
    color: #e2e8f0;
    font-size: 0.98rem;
    flex: 1;
}


/* ========================================================
   PDF VIEWER & MULTI-VIEW TABS
   ======================================================== */
.sop-view-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #25334d;
    padding-bottom: 10px;
}

.sop-tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #94a3b8;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.sop-tab-btn:hover {
    color: #ffffff;
    background: rgba(56, 189, 248, 0.08);
}

.sop-tab-btn.active {
    color: #38bdf8;
    background: #161f30;
    border-color: #25334d;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.sop-pdf-viewer-wrap {
    background: #0f172a;
    border: 1px solid #25334d;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

.sop-pdf-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.4rem;
    background: #161f30;
    border-bottom: 1px solid #25334d;
}

.sop-pdf-bar-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.98rem;
    font-weight: 600;
    color: #f1f5f9;
}

.sop-pdf-frame-box {
    position: relative;
    width: 100%;
    height: 850px;
    background: #1e293b;
    transition: height 0.3s ease;
}

.sop-pdf-frame-box.expanded {
    height: 1250px;
}

.sop-pdf-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}
