/* Custom Global Variables for a Stress-Free Theme */
:root {
    --bg-main: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --primary-gradient: linear-gradient(135deg, #059669, #0f766e);
    --card-bg: #ffffff;
    --border-color: #f1f5f9;
    --border-dark: #e2e8f0;
    --accent-blue: #eff6ff;
    --text-blue: #1d4ed8;
    --badge-green: #ecfdf5;
    --text-green: #047857;
}

/* Reset and Layout Foundations */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
}

/* Header Component styling */
.main-header {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

@media(min-width: 768px) {
    .header-container {
        flex-direction: row;
    }
}

.brand-block h1 {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.sub-tag {
    color: #ccfbf1;
    font-size: 0.875rem;
    margin-top: 4px;
}

.portal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.portal-btn {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: background-color 0.2s;
}

.portal-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Dashboard Structural Grids */
.dashboard-grid {
    flex-grow: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 32px 16px;
    display: grid;
    grid-template-cols: 1fr;
    gap: 32px;
}

@media(min-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 2fr 1fr;
    }
}

.content-stream, .sidebar-stream {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Card Style Architectures */
.status-card {
    background-color: var(--accent-blue);
    border: 1px solid #bfdbfe;
    padding: 16px;
    border-radius: 12px;
    display: flex;
    gap: 12px;
    align-items: start;
}

.live-badge {
    background-color: #3b82f6;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-text-block h3 {
    font-size: 0.875rem;
    color: #1e3a8a;
    font-weight: 700;
}

#live-status-text {
    font-size: 0.75rem;
    color: #1d4ed8;
    margin-top: 2px;
}

/* Resource Vault Section Layouts */
.resource-vault, .planner-card, .checklist-card {
    background-color: var(--card-bg);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.vault-header {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    margin-bottom: 24px;
}

@media(min-width: 640px) {
    .vault-header {
        flex-direction: row;
        align-items: center;
    }
}

.vault-header h2, .planner-header h2 {
    font-size: 1.25rem;
    color: #0f172a;
}

/* Control Toggle Button Elements */
.toggle-group {
    background-color: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
    display: inline-flex;
}

.toggle-btn {
    border: none;
    background: none;
    padding: 6px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-btn.active {
    background-color: white;
    color: #0f766e;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.section-block {
    margin-bottom: 24px;
}

.section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin-bottom: 12px;
    font-weight: 700;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-node {
    background-color: var(--bg-main);
    color: #334155;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 9999px;
    font-weight: 500;
    border: 1px solid var(--border-dark);
}

.pdf-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media(min-width: 640px) {
    .pdf-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.pdf-anchor {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border-dark);
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.pdf-anchor:hover {
    background-color: var(--bg-main);
    border-color: #0f766e;
}

.pdf-anchor span:first-child {
    color: #334155;
    font-weight: 500;
}

.pdf-anchor:hover span:first-child {
    color: #0f766e;
}

.pdf-download-text {
    color: var(--text-light);
}

/* Ported Tracker Content Areas */
.planner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.port-badge {
    font-size: 0.75rem;
    background-color: var(--badge-green);
    color: var(--text-green);
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
}

.planner-desc, .checklist-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.placeholder-box {
    border: 2px dashed var(--border-dark);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    color: var(--text-light);
    font-size: 0.75rem;
}

/* Checklist Parameters Setup */
.checklist-card h2 {
    font-size: 1.125rem;
    margin-bottom: 4px;
}

.checklist-items {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checklist-items li label {
    font-size: 0.75rem;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checklist-items input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #0f766e;
}

/* Chatbot Terminal Interfaces */
.chatbot-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 400px;
}

.chat-header {
    background-color: #0f172a;
    color: white;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h2 {
    font-size: 0.875rem;
    font-weight: 700;
}

.chat-header p {
    font-size: 0.625rem;
    color: var(--text-light);
}

.pulse-indicator {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
}

.chat-body {
    flex-grow: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-bubble {
    font-size: 0.75rem;
    padding: 12px;
    border-radius: 12px;
    max-w: 85%;
}

.standard-bot {
    background-color: #f1f5f9;
    color: #334155;
    border-top-left-radius: 0;
}

.chat-footer {
    padding: 12px;
    border-top: 1px solid var(--border-color);
    background-color: #f8fafc;
    display: flex;
    gap: 8px;
}

#chat-input {
    flex-grow: 1;
    border: 1px solid var(--border-dark);
    background-color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    outline: none;
}

#chat-input:focus {
    border-color: #0f766e;
}

.send-btn {
    background-color: #0f766e;
    color: white;
    border: none;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.75rem;
    cursor: pointer;
}

.send-btn:hover {
    background-color: #0d615a;
}

/* Subtle Credit Footer Node styling */
.main-footer {
    text-align: center;
    padding: 16px;
    border-top: 1px solid var(--border-dark);
    background-color: #f8fafc;
    margin-top: auto;
}

.footer-legal {
    font-size: 0.75rem;
    color: var(--text-light);
}

.footer-credit {
    font-size: 0.625rem;
    color: #cbd5e1;
    margin-top: 4px;
}

.footer-credit a {
    color: #cbd5e1;
    text-decoration: none;
}

.footer-credit a:hover {
    text-decoration: underline;
    color: var(--text-light);
}
