/* ==========================================================================
   PORTAL DO DESENVOLVEDOR, DOCUMENTAÇÃO & MANUTENÇÃO (dev_guide.css)
   CRM Brasil Componentes - Design System
   ========================================================================== */

.dev-guide-container {
    animation: fadeIn 0.25s ease-out;
    padding-bottom: 3rem;
}

/* Header & Hero */
.dev-guide-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: 16px;
    padding: 2rem 2.25rem;
    color: #ffffff;
    margin-bottom: 2rem;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.25);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
}

.dev-guide-hero::after {
    content: '</>';
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    font-family: monospace;
    font-size: 8rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.03);
    pointer-events: none;
}

.dev-hero-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.02em;
}

.dev-hero-subtitle {
    margin: 0;
    font-size: 0.95rem;
    color: #94a3b8;
    max-width: 680px;
    line-height: 1.5;
}

.dev-hero-badges {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: center;
}

.dev-hero-pill {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #e2e8f0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.dev-hero-pill.success {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
}

/* Tabs Navigation */
.dev-nav-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border-subtle, #e2e8f0);
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: 2px;
}

.dev-nav-tab {
    background: none;
    border: none;
    padding: 0.85rem 1.35rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-muted, #64748b);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    border-radius: 8px 8px 0 0;
}

.dev-nav-tab:hover {
    color: var(--color-primary, #0f766e);
    background: rgba(15, 118, 110, 0.04);
}

.dev-nav-tab.active {
    color: var(--color-primary, #0f766e);
    border-bottom: 2px solid var(--color-primary, #0f766e);
    background: #ffffff;
    font-weight: 700;
}

/* Tab Content Panels */
.dev-tab-panel {
    display: none;
    animation: fadeIn 0.2s ease-out;
}

.dev-tab-panel.active {
    display: block;
}

/* Cards & Layout */
.dev-card {
    background: #ffffff;
    border: 1px solid var(--border-subtle, #e2e8f0);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 1.75rem;
}

.dev-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle, #e2e8f0);
    margin-bottom: 1.25rem;
}

.dev-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dev-card-subtitle {
    margin: 0.25rem 0 0 0;
    font-size: 0.85rem;
    color: var(--text-muted, #64748b);
}

/* Documentation Catalog Grid */
.doc-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.25rem;
}

.doc-card {
    background: #ffffff;
    border: 1px solid var(--border-subtle, #e2e8f0);
    border-radius: 10px;
    padding: 1.25rem;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.doc-card:hover {
    border-color: var(--color-primary, #0f766e);
    box-shadow: 0 6px 16px -2px rgba(15, 118, 110, 0.12);
    transform: translateY(-2px);
}

.doc-card-badge {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.doc-card-badge.backend {
    background: #e0f2fe;
    color: #0369a1;
}

.doc-card-badge.frontend {
    background: #fef3c7;
    color: #b45309;
}

.doc-card-badge.general {
    background: #dcfce7;
    color: #15803d;
}

.doc-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.4rem 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.doc-card-desc {
    font-size: 0.84rem;
    color: #475569;
    line-height: 1.45;
    margin: 0 0 1rem 0;
    flex-grow: 1;
}

.doc-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px dashed #e2e8f0;
    font-size: 0.78rem;
    color: #64748b;
}

.doc-card-path {
    font-family: monospace;
    background: #f1f5f9;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* Step-by-Step Tutorial Elements */
.tutorial-step-timeline {
    position: relative;
    padding-left: 2.5rem;
    margin: 1.5rem 0;
}

.tutorial-step-timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background: #e2e8f0;
}

.tutorial-step-item {
    position: relative;
    margin-bottom: 2rem;
}

.tutorial-step-item:last-child {
    margin-bottom: 0;
}

.tutorial-step-number {
    position: absolute;
    left: -2.5rem;
    top: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--color-primary, #0f766e);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 4px #ffffff, 0 2px 6px rgba(0, 0, 0, 0.15);
}

.tutorial-step-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.35rem 0;
}

.tutorial-step-desc {
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.5;
    margin: 0 0 0.85rem 0;
}

/* Code Snippets & Copy Boxes */
.code-box-wrapper {
    background: #1e293b;
    border-radius: 8px;
    overflow: hidden;
    margin: 0.85rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.code-box-header {
    background: #0f172a;
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #334155;
    font-size: 0.78rem;
    color: #94a3b8;
}

.code-box-lang {
    font-family: monospace;
    font-weight: 600;
    color: #38bdf8;
}

.btn-copy-code {
    background: #334155;
    border: none;
    color: #e2e8f0;
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-copy-code:hover {
    background: #475569;
    color: #ffffff;
}

.code-box-body {
    padding: 1rem;
    margin: 0;
    overflow-x: auto;
    color: #f8fafc;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.84rem;
    line-height: 1.5;
}

/* Live Maintenance Panel */
.maint-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.maint-metric-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.15rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.maint-metric-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.maint-metric-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.green { background: #10b981; box-shadow: 0 0 8px #10b981; }
.status-dot.amber { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }
.status-dot.red   { background: #ef4444; box-shadow: 0 0 8px #ef4444; }
.status-dot.gray  { background: #94a3b8; }

.maint-metric-detail {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.5rem;
}

/* Checklist */
.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.checklist-item:last-child {
    border-bottom: none;
}

.checklist-checkbox {
    margin-top: 0.25rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checklist-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.checklist-desc {
    font-size: 0.82rem;
    color: #64748b;
    margin: 0.2rem 0 0 0;
}

/* Search Input */
.doc-search-wrapper {
    position: relative;
    max-width: 320px;
    width: 100%;
}

.doc-search-input {
    width: 100%;
    padding: 0.5rem 0.85rem 0.5rem 2.25rem;
    font-size: 0.85rem;
    border: 1px solid var(--border-subtle, #cbd5e1);
    border-radius: 8px;
    background: #ffffff;
    outline: none;
    transition: border-color 0.15s ease;
}

.doc-search-input:focus {
    border-color: var(--color-primary, #0f766e);
}

.doc-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
    .dev-guide-hero {
        padding: 1.5rem;
    }
    .dev-hero-title {
        font-size: 1.3rem;
    }
    .doc-catalog-grid {
        grid-template-columns: 1fr;
    }
    .tutorial-step-timeline {
        padding-left: 2rem;
    }
    .tutorial-step-number {
        left: -2rem;
        width: 1.6rem;
        height: 1.6rem;
        font-size: 0.75rem;
    }
}
