/* Modern, Calm, CFO-Friendly Design System */
:root {
    /* Color Palette - Slate/Zinc inspired for a professional feel */
    --bg-body: #f8fafc;
    /* Slate-50 */
    --bg-card: #ffffff;
    /* White */
    --text-primary: #0f172a;
    /* Slate-900 */
    --text-secondary: #64748b;
    /* Slate-500 */
    --border-subtle: #e2e8f0;
    /* Slate-200 */

    /* Default Brand Settings (Will be overridden by themes) */
    --brand-primary: #0ea5e9;
    /* Sky-500 */
    --brand-hover: #0284c7;
    /* Sky-600 */
    --accent-subtle: #f0f9ff;
    /* Sky-50 */
    --hue-rotate: 0deg;
    /* Default filter */

    /* Status Colors */
    --status-disabled: #f1f5f9;
    /* Slate-100 */
    --text-disabled: #94a3b8;
    /* Slate-400 */

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* Spacing System */
    --space-2: 0.5rem;
    /* 8px */
    --space-3: 0.75rem;
    /* 12px */
    --space-4: 1rem;
    /* 16px */
    --space-6: 1.5rem;
    /* 24px */
    --space-8: 2rem;
    /* 32px */
    --space-12: 3rem;
    /* 48px */

    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-lg: 0.75rem;
    /* 12px */
    --radius-full: 9999px;

    --transition-base: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Themes */
.theme-accountant {
    --brand-primary: #0ea5e9;
    /* Blue */
    --brand-hover: #0284c7;
    --accent-subtle: #f0f9ff;
    --hue-rotate: 0deg;
    /* Native Blue */
}

.theme-hr {
    --brand-primary: #d946ef;
    /* Fuchsia/Pink */
    --brand-hover: #c026d3;
    --accent-subtle: #fdf4ff;
    --hue-rotate: 290deg;
    /* Shift to Pink/Purple */
}

.theme-procurement {
    --brand-primary: #10b981;
    /* Emerald */
    --brand-hover: #059669;
    --accent-subtle: #ecfdf5;
    --hue-rotate: 140deg;
    /* Shift to Green */
}

.theme-pro {
    --brand-primary: #f59e0b;
    /* Amber */
    --brand-hover: #d97706;
    --accent-subtle: #fffbeb;
    --hue-rotate: 40deg;
    /* Shift to Orange/Gold */
}

.theme-it {
    --brand-primary: #6366f1;
    /* Indigo */
    --brand-hover: #4f46e5;
    --accent-subtle: #eef2ff;
    --hue-rotate: 240deg;
    /* Shift to Indigo/Purple */
}


/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-body);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Layout Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-8) var(--space-4);
    width: 100%;
}

/* Header */
.header {
    margin-bottom: var(--space-12);
    text-align: left;
}

/* New Header Layout */
.header-content {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-2);
}

.header-logo {
    width: 64px;
    /* Constraint size */
    height: 64px;
    object-fit: contain;
    /* Ensure full logo is visible */
    border-radius: var(--space-2);
}

.brand-title {
    font-size: 1.875rem;
    /* 30px */
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin: 0;
    /* Remove bottom margin as flex gap handles spacing */
    line-height: 1.1;
}

.brand-subtitle {
    font-size: 1.125rem;
    /* 18px */
    color: var(--text-secondary);
    font-weight: 400;
    margin-left: calc(64px + 1rem);
    /* Align with text start (logo width + gap) */
}

/* Grid System */
.grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: var(--space-6);
}

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

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

/* Card Component */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 200px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-base);
}

.card:not(.card-disabled):hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-primary);
}

/* Active Card Styling */
.card-active {
    cursor: pointer;
}

/* Internal Layout - Horizontal */
.card-content {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    width: 100%;
}

/* Employee Photo / Avatar Styling - 80px Square Update */
.card-icon {
    width: 80px;
    /* Increased size */
    height: 80px;
    flex-shrink: 0;
    background-color: var(--accent-subtle);
    border-radius: var(--radius-lg);
    /* Rounded Square (not full circle) */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: var(--space-6);
    /* Increased spacing for visual balance */
    overflow: hidden;
    border: 2px solid #fff;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: hue-rotate(var(--hue-rotate));
    transform: scale(1.35);
    /* Zoom in to crop internal margins */
    transition: transform 0.3s ease;
    transform-origin: center center;
}

.card:hover .card-icon img {
    transform: scale(1.45);
    /* Slight zoom on hover */
}

.card-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
    line-height: 1.25;
}

.card-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.card-action {
    margin-top: var(--space-6);
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--brand-primary);
    padding-left: calc(80px + 1.5rem);
    /* Align with text start (icon width + gap) */
}

.card-action svg {
    width: 16px;
    height: 16px;
    margin-left: 4px;
    transition: transform 0.2s ease;
}

.card-active:hover .card-action svg {
    transform: translateX(4px);
}

/* Disabled Card Styling */
.card-disabled {
    background-color: #fafbfc;
    border-color: transparent;
    cursor: default;
    opacity: 0.9;
}

.card-disabled .card-icon {
    background-color: var(--status-disabled);
}

.card-disabled .card-icon img {
    opacity: 0.7;
}

.card-disabled .card-title {
    color: var(--text-disabled);
}

.card-disabled .card-description {
    color: var(--text-disabled);
}

.badge-coming-soon {
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    background-color: var(--status-disabled);
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 10;
}

/* Utilities */
.hidden {
    display: none;
}