/* ==========================================================================
   AI Progress Camera — Page-Specific Styles
   Builds on top of ../../css/hub.css (shared parent stylesheet)
   ========================================================================== */

/* ---------- Page Layout ---------- */
.aip-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px 60px;
}

/* ==========================================================================
   Stat Grid (4-col -> 2-col responsive)
   ========================================================================== */
.aip-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

.aip-stat {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px 24px;
    text-align: center;
}

.aip-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.aip-stat-label {
    font-size: 0.8rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 4px;
    font-weight: 600;
}

.aip-stat-sub {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 2px;
}

/* Coloured top border per stat */
.aip-stat[data-color="blue"]   { border-top: 3px solid #3b82f6; }
.aip-stat[data-color="green"]  { border-top: 3px solid #22c55e; }
.aip-stat[data-color="amber"]  { border-top: 3px solid #f59e0b; }
.aip-stat[data-color="purple"] { border-top: 3px solid #8b5cf6; }

@media (max-width: 900px) {
    .aip-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   Section Headings
   ========================================================================== */
.aip-section {
    margin-bottom: 40px;
}

.aip-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 0;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

/* ==========================================================================
   Data Tables
   ========================================================================== */
.aip-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.aip-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.aip-table thead th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
}

.aip-table tbody td {
    padding: 12px 16px;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}

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

.aip-table tbody td strong {
    color: #1e293b;
}

.aip-table tbody tr:hover {
    background: #f8fafc;
}

/* ==========================================================================
   Hardware / Detection Cards (2-col)
   ========================================================================== */
.aip-hw-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.aip-hw-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
}

.aip-hw-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 10px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.aip-hw-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.aip-hw-list li {
    padding: 4px 0;
    font-size: 0.875rem;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
}

.aip-hw-list li:last-child {
    border-bottom: none;
}

.aip-hw-list li strong {
    color: #1e293b;
}

@media (max-width: 700px) {
    .aip-hw-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Note & Warning Callouts
   ========================================================================== */
.aip-note {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-left: 4px solid #3b82f6;
    border-radius: 8px;
    padding: 16px 20px;
    font-size: 0.875rem;
    color: #1e40af;
    line-height: 1.6;
    margin-bottom: 16px;
}

.aip-note-muted {
    background: #f8fafc;
    border-color: #e2e8f0;
    border-left-color: #94a3b8;
    color: #475569;
    margin-top: 16px;
}

.aip-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    padding: 16px 20px;
    font-size: 0.875rem;
    color: #92400e;
    line-height: 1.6;
    margin-bottom: 16px;
}

/* ==========================================================================
   Key Links Grid (2-col)
   ========================================================================== */
.aip-links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.aip-link-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.aip-link-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #3b82f6;
    text-decoration: none;
    color: inherit;
}

.aip-link-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #eff6ff;
    color: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aip-link-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
}

.aip-link-desc {
    font-size: 0.78rem;
    color: #64748b;
}

@media (max-width: 600px) {
    .aip-links-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Dark Mode Overrides
   ========================================================================== */
[data-theme="dark"] .aip-stat,
[data-theme="dark"] .aip-hw-card,
[data-theme="dark"] .aip-link-card {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .aip-stat-value,
[data-theme="dark"] .aip-section-title,
[data-theme="dark"] .aip-hw-title,
[data-theme="dark"] .aip-link-title {
    color: #e2e8f0;
}

[data-theme="dark"] .aip-stat-label,
[data-theme="dark"] .aip-link-desc {
    color: #94a3b8;
}

[data-theme="dark"] .aip-hw-list li {
    color: #94a3b8;
    border-color: #334155;
}

[data-theme="dark"] .aip-hw-list li strong {
    color: #e2e8f0;
}

[data-theme="dark"] .aip-section-title {
    border-color: #334155;
}

[data-theme="dark"] .aip-link-icon {
    background: rgba(59, 130, 246, 0.15);
}

[data-theme="dark"] .aip-stat-sub {
    color: #64748b;
}

/* Dark mode — tables */
[data-theme="dark"] .aip-table {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .aip-table thead th {
    background: #0f172a;
    color: #94a3b8;
    border-color: #334155;
}

[data-theme="dark"] .aip-table tbody td {
    color: #94a3b8;
    border-color: #334155;
}

[data-theme="dark"] .aip-table tbody td strong {
    color: #e2e8f0;
}

[data-theme="dark"] .aip-table tbody tr:hover {
    background: #334155;
}

/* Dark mode — callouts */
[data-theme="dark"] .aip-note {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    border-left-color: #3b82f6;
    color: #93c5fd;
}

[data-theme="dark"] .aip-note-muted {
    background: rgba(148, 163, 184, 0.08);
    border-color: #334155;
    border-left-color: #475569;
    color: #94a3b8;
}

[data-theme="dark"] .aip-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    border-left-color: #f59e0b;
    color: #fcd34d;
}
