/* Growth OS V3.0 - SPA Views Consolidated Styling */

/* Common Layout Helpers */
.view-header-row {
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.data-protection-badge {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-header-border {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}

.badge-emerald {
    background: rgba(0, 230, 118, 0.15);
    color: var(--accent-emerald, #00e676);
}

.badge-cyan {
    background: rgba(0, 176, 255, 0.15);
    color: var(--accent-cyan, #00b0ff);
}

.badge-amber {
    background: rgba(255, 196, 0, 0.15);
    color: var(--accent-amber, #ffc400);
}

.badge-rose {
    background: rgba(255, 23, 68, 0.15);
    color: var(--accent-rose, #ff1744);
}

/* Health Score Widget Styles */
.health-panel-body {
    padding: 16px;
    border: 1.5px solid var(--border-color, rgba(255, 255, 255, 0.08));
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.health-score-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 16px;
    align-items: center;
}

.health-score-value-box {
    text-align: center;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    padding-left: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.health-score-num {
    font-size: 52px;
    font-weight: 900;
    color: var(--accent-emerald, #00e676);
}

.health-score-label {
    font-size: 9px;
    color: var(--text-secondary, #a0aec0);
    margin-top: -5px;
}

.health-factors-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 10.5px;
}

.health-factors-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.health-path-to-100-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px;
    font-size: 10.5px;
}

/* WWSD Panel */
.wwsd-panel {
    padding: 16px;
    border: 1.5px solid var(--accent-amber, #ffc400);
    background: rgba(255, 196, 0, 0.01);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wwsd-panel-header {
    border-bottom: 1px solid rgba(255, 196, 0, 0.1);
    padding-bottom: 8px;
}

.wwsd-financial-impact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 11px;
    margin-top: 4px;
}

/* Dashboard Metric Cards Grid */
.dashboard-grid-v3 {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 20px;
    align-items: start;
}

.column-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dashboard-metric-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 110px;
    padding: 12px 16px;
}

.stat-value-styled {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    margin: 4px 0;
}

.attribution-panel {
    padding: 16px;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
}

.projections-panel {
    padding: 16px;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.projections-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    font-size: 10.5px;
}

.projection-card-item {
    background: rgba(255, 255, 255, 0.01);
    padding: 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

/* Sami AI Specific Layout Elements */
.sami-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sami-mode-box {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    padding: 8px 16px;
    border-radius: 10px;
}

.sami-mode-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sami-key-setup-box {
    margin-bottom: 20px;
    border-color: var(--accent-amber, #ffc400);
    background: rgba(255, 196, 0, 0.02);
}

.sami-key-input-row {
    display: flex;
    gap: 10px;
}

.sami-key-input-field {
    flex: 1;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    color: #fff;
    border-radius: 6px;
    font-size: 11px;
    font-family: monospace;
    outline: none;
}

.sami-tab-decisions-grid {
    border: 1.5px solid var(--border-color, rgba(255, 255, 255, 0.08));
    display: grid;
    grid-template-columns: 1fr 1.3fr 1.3fr;
    gap: 16px;
    padding: 16px;
}

.sami-tab-dna-col1 {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    padding-left: 16px;
}

.sami-tab-dna-col2 {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    padding-left: 16px;
    justify-content: center;
}

.sami-tab-dna-col3 {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 10px;
    justify-content: center;
}

/* Modals Consolidated */
.modal-overlay-custom {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 7, 12, 0.9);
    backdrop-filter: blur(10px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    direction: rtl;
    font-family: var(--font-ar, 'Tajawal', sans-serif);
}

.modal-content-custom {
    background: rgba(22, 28, 45, 0.95);
    border: 1.5px solid var(--accent-cyan, #00b0ff);
    box-shadow: 0 0 30px rgba(0, 176, 255, 0.2);
    padding: 25px;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    text-align: right;
    position: relative;
}

.modal-header-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.modal-body-custom {
    font-size: 11.5px;
    line-height: 1.6;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-footer-custom {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 12px;
}

/* Executive Alert Card Styling */
.sami-executive-alert-card {
    background: rgba(255, 23, 68, 0.02) !important;
    border: 1.5px solid rgba(255, 23, 68, 0.15) !important;
    border-right: 4px solid var(--accent-rose, #ff1744) !important;
    border-radius: 12px;
    padding: 12px 18px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 8px;
    width: 100%;
    transition: all 0.25s ease;
}

.sami-executive-alert-card:hover {
    background: rgba(255, 23, 68, 0.05) !important;
    border-color: rgba(255, 23, 68, 0.35) !important;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .sami-executive-alert-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .sami-executive-alert-card button {
        width: 100%;
    }
}

/* Responsive health card grid overrides */
.sami-tab-decisions-grid {
    border: 1.5px solid var(--border-color, rgba(255, 255, 255, 0.08));
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    padding: 16px;
}

@media (max-width: 768px) {
    .sami-tab-dna-col1, .sami-tab-dna-col2 {
        border-left: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        padding-left: 0 !important;
        padding-bottom: 16px;
    }
}
