/* Fortress Risk Management - Custom Styling */

:root {
    --color-blue-50: #f0f9ff;
    --color-blue-100: #e0f2fe;
    --color-blue-600: #2563eb;
    --color-blue-700: #1d4ed8;
    --color-slate-50: #f8fafc;
    --color-slate-100: #f1f5f9;
    --color-slate-200: #e2e8f0;
    --color-slate-400: #cbd5e1;
    --color-slate-500: #64748b;
    --color-slate-600: #475569;
    --color-slate-700: #334155;
    --color-slate-800: #1e293b;
    --color-slate-900: #0f172a;
}

/* ============================================
   DASHBOARD CARDS
   ============================================ */

.dashboard-card {
    display: flex;
    flex-direction: column;
    background: white;
    border: none;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.dashboard-card:hover {
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
    transform: scale(1.02);
}

.dashboard-card-header {
    padding: 2rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
}

.dashboard-card-icon-wrapper {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-card:hover .dashboard-card-icon-wrapper {
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.15);
    transform: scale(1.1);
}

.dashboard-card-icon-wrapper svg {
    width: 1.5rem;
    height: 1.5rem;
    color: white;
}

.dashboard-card-content-wrapper {
    flex: 1;
    min-width: 0;
}

.dashboard-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-slate-900);
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.dashboard-card:hover .dashboard-card-title {
    color: var(--color-slate-700);
}

.dashboard-card-description {
    font-size: 0.875rem;
    color: var(--color-slate-600);
    line-height: 1.5;
}

.dashboard-card-arrow {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background-color: var(--color-slate-100);
    transition: all 0.3s ease;
}

.dashboard-card:hover .dashboard-card-arrow {
    background-color: var(--color-slate-200);
}

.dashboard-card-arrow svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--color-slate-400);
    transition: all 0.3s ease;
}

.dashboard-card:hover .dashboard-card-arrow svg {
    color: var(--color-slate-700);
    transform: translateX(0.25rem);
}

.dashboard-card-body {
    padding: 2rem;
    background: white;
}

.dashboard-card-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    text-align: center;
}

.dashboard-card-stat {
    transition: transform 0.3s ease;
}

.dashboard-card:hover .dashboard-card-stat {
    transform: scale(1.05);
}

.dashboard-card-stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    background: linear-gradient(to bottom right, var(--color-slate-900), var(--color-slate-700));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.dashboard-card-stat-label {
    font-size: 0.75rem;
    color: var(--color-slate-500);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   COLOR VARIANTS FOR CARDS
   ============================================ */

/* Cyan variant (Operations Stand Up / Daily Meeting) */
.dashboard-card.card-cyan .dashboard-card-header {
    background-color: #ecfeff;
    border-bottom-color: rgba(6, 182, 212, 0.2);
}

.dashboard-card.card-cyan .dashboard-card-icon-wrapper {
    background: linear-gradient(to bottom right, #0891b2, #0e7490);
}

.dashboard-card.card-cyan:hover .dashboard-card-arrow {
    background-color: #cffafe;
}

.dashboard-card.card-cyan:hover .dashboard-card-arrow svg {
    color: #0e7490;
}

/* Blue variant (Survey) */
.dashboard-card.card-blue .dashboard-card-header {
    background-color: var(--color-blue-50);
    border-bottom-color: rgba(37, 99, 235, 0.2);
}

.dashboard-card.card-blue .dashboard-card-icon-wrapper {
    background: linear-gradient(to bottom right, var(--color-blue-600), var(--color-blue-700));
}

.dashboard-card.card-blue:hover .dashboard-card-arrow {
    background-color: var(--color-blue-100);
}

.dashboard-card.card-blue:hover .dashboard-card-arrow svg {
    color: var(--color-blue-600);
}

/* Red variant (Clinical Risk) */
.dashboard-card.card-red .dashboard-card-header {
    background-color: #fef2f2;
    border-bottom-color: rgba(239, 68, 68, 0.2);
}

.dashboard-card.card-red .dashboard-card-icon-wrapper {
    background: linear-gradient(to bottom right, #ef4444, #dc2626);
}

.dashboard-card.card-red:hover .dashboard-card-arrow {
    background-color: #fee2e2;
}

.dashboard-card.card-red:hover .dashboard-card-arrow svg {
    color: #dc2626;
}

/* Green variant (Performance) */
.dashboard-card.card-green .dashboard-card-header {
    background-color: #f0fdf4;
    border-bottom-color: rgba(34, 197, 94, 0.2);
}

.dashboard-card.card-green .dashboard-card-icon-wrapper {
    background: linear-gradient(to bottom right, #22c55e, #16a34a);
}

.dashboard-card.card-green:hover .dashboard-card-arrow {
    background-color: #dcfce7;
}

.dashboard-card.card-green:hover .dashboard-card-arrow svg {
    color: #16a34a;
}

/* Orange variant (Grievance) */
.dashboard-card.card-orange .dashboard-card-header {
    background-color: #fff7ed;
    border-bottom-color: rgba(249, 115, 22, 0.2);
}

.dashboard-card.card-orange .dashboard-card-icon-wrapper {
    background: linear-gradient(to bottom right, #f97316, #ea580c);
}

.dashboard-card.card-orange:hover .dashboard-card-arrow {
    background-color: #fed7aa;
}

.dashboard-card.card-orange:hover .dashboard-card-arrow svg {
    color: #ea580c;
}

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */

.dashboard-container {
    min-height: 100vh;
    background: linear-gradient(to bottom right, var(--color-slate-50), rgba(191, 219, 254, 0.3), var(--color-slate-100));
    padding: 1.5rem;
}

@media (min-width: 768px) {
    .dashboard-container {
        padding: 2.5rem;
    }
}

.dashboard-header {
    margin-bottom: 2.5rem;
}

.dashboard-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--color-slate-900);
    margin-bottom: 0.25rem;
}

.dashboard-subtitle {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-slate-700);
    margin-bottom: 2rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

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

@media (min-width: 1280px) {
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================
   SIDEBAR — BASECOAT OVERRIDES
   ============================================ */

/* Header: override basecoat's default padding/flex-direction */
.sidebar nav > header {
    padding: 1.5rem !important;
    border-bottom: 1px solid var(--color-slate-200);
    flex-direction: row !important;
}

/* Footer: override basecoat's default padding */
.sidebar nav > footer {
    padding: 1rem !important;
    border-top: 1px solid var(--color-slate-200);
    flex-direction: column !important;
}

/* Uppercase all sidebar group labels (matching Base44 reference) */
.sidebar nav > section h3 {
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Active items get rounded corners */
.sidebar nav > section ul li > a[aria-current="page"] {
    border-radius: 0.75rem;
}

/* ============================================
   SIDEBAR — SECTION HOVER & ACTIVE COLORS
   ============================================ */

/* Home (blue) */
[data-section="home"] li > a:hover {
    background-color: #eff6ff !important;
    color: #1d4ed8 !important;
}
[data-section="home"] li > a[aria-current="page"] {
    background-color: #dbeafe !important;
    color: #1d4ed8 !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05) !important;
}

/* Daily Meeting (cyan) */
[data-section="daily-meeting"] li > a:hover {
    background-color: #ecfeff !important;
    color: #0e7490 !important;
}
[data-section="daily-meeting"] li > a[aria-current="page"] {
    background-color: #cffafe !important;
    color: #0e7490 !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05) !important;
}

/* Clinical Risk (red) */
[data-section="clinical-risk"] li > a:hover {
    background-color: #fef2f2 !important;
    color: #b91c1c !important;
}
[data-section="clinical-risk"] li > a[aria-current="page"] {
    background-color: #fee2e2 !important;
    color: #b91c1c !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05) !important;
}

/* Performance (green) */
[data-section="performance"] li > a:hover {
    background-color: #f0fdf4 !important;
    color: #15803d !important;
}
[data-section="performance"] li > a[aria-current="page"] {
    background-color: #dcfce7 !important;
    color: #15803d !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05) !important;
}

/* Grievance (orange) */
[data-section="grievance"] li > a:hover {
    background-color: #fff7ed !important;
    color: #c2410c !important;
}
[data-section="grievance"] li > a[aria-current="page"] {
    background-color: #ffedd5 !important;
    color: #c2410c !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05) !important;
}

/* Survey (blue) */
[data-section="survey"] li > a:hover {
    background-color: #eff6ff !important;
    color: #1d4ed8 !important;
}
[data-section="survey"] li > a[aria-current="page"] {
    background-color: #dbeafe !important;
    color: #1d4ed8 !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05) !important;
}

/* Administration & Global Administration (purple) */
[data-section="admin"] li > a:hover,
[data-section="global-admin"] li > a:hover {
    background-color: #faf5ff !important;
    color: #7e22ce !important;
}
[data-section="admin"] li > a[aria-current="page"],
[data-section="global-admin"] li > a[aria-current="page"] {
    background-color: #f3e8ff !important;
    color: #7e22ce !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05) !important;
}

/* Training (amber) */
[data-section="training"] li > a:hover {
    background-color: #fffbeb !important;
    color: #b45309 !important;
}
[data-section="training"] li > a[aria-current="page"] {
    background-color: #fef3c7 !important;
    color: #b45309 !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05) !important;
}

/* ============================================
   PLACEHOLDER PAGE
   ============================================ */

.placeholder-container {
    padding: 1.5rem;
}

@media (min-width: 768px) {
    .placeholder-container {
        padding: 2rem;
    }
}

.placeholder-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--color-slate-900);
    margin-bottom: 1rem;
}

.placeholder-card {
    background: white;
    border: none;
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    padding: 4rem 2rem;
    text-align: center;
}

.placeholder-icon {
    width: 4rem;
    height: 4rem;
    background-color: var(--color-slate-100);
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.placeholder-icon svg {
    width: 2rem;
    height: 2rem;
    color: var(--color-slate-400);
}

.placeholder-heading {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-slate-700);
    margin-bottom: 0.5rem;
}

.placeholder-text {
    font-size: 0.875rem;
    color: var(--color-slate-500);
    max-width: 28rem;
    margin: 0 auto;
}

/* ============================================
   BUTTON STYLING
   ============================================ */

button:not(:disabled):hover {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    .dashboard-card-header {
        flex-direction: column;
        gap: 1rem;
    }

    .dashboard-card-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .dashboard-title {
        font-size: 1.5rem;
    }

    .dashboard-subtitle {
        font-size: 1rem;
    }
}
