/* FSM Platform - Business Theme */
/* Palette: https://www.happyhues.co/palettes/14 */

:root {
    /* Palette Variables */
    --bg-main: #fffffe;
    --text-headline: #272343;
    --text-paragraph: #2d334a;
    --btn-primary: #ffd803;
    --btn-primary-text: #272343;
    --stroke: #272343;
    --highlight: #ffd803;
    --bg-secondary: #e3f6f5;
    --bg-tertiary: #bae8e8;
    --white: #ffffff;
    
    /* Functional Variables */
    --border-radius: 8px;
    --container-width: 1200px;
    --shadow-sm: 0 2px 4px rgba(39, 35, 67, 0.05);
    --shadow-md: 0 4px 8px rgba(39, 35, 67, 0.1);
    --shadow-lg: 0 8px 16px rgba(39, 35, 67, 0.15);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-paragraph);
    background-color: var(--bg-main);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-headline);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    color: var(--text-headline);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--text-paragraph);
}

/* 3-Layered Focus Architecture */

/* Layer 1: Primary Focus (Hero, KPI, Main Actions) */
.focus-layer-1 {
    background-color: var(--bg-main);
    color: var(--text-headline);
    position: relative;
    z-index: 10;
}

.focus-layer-1 h1 {
    font-size: 3.5rem;
    letter-spacing: -0.02em;
}

.btn-primary {
    background-color: var(--btn-primary);
    color: var(--btn-primary-text);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    border: 2px solid transparent;
    cursor: pointer;
    display: inline-block;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Layer 2: Context & Support (Features, Explanations, Secondary Actions) */
.focus-layer-2 {
    background-color: var(--bg-secondary);
    padding: 4rem 0;
    border-top: 1px solid rgba(39, 35, 67, 0.05);
    border-bottom: 1px solid rgba(39, 35, 67, 0.05);
}

.card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    border: 1px solid transparent;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--stroke);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-headline);
    border: 2px solid var(--stroke);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: var(--stroke);
    color: var(--bg-main);
}

/* Layer 3: Details & Meta (Footer, Data Tables, Settings) */
.focus-layer-3 {
    background-color: var(--bg-tertiary); /* Using tertiary color for deep background */
    color: var(--text-headline);
    padding: 2rem 0;
    font-size: 0.9rem;
}

.focus-layer-3 a {
    opacity: 0.8;
}

.focus-layer-3 a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Layout Components */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--bg-main);
    padding: 1.5rem 0;
    border-bottom: 2px solid var(--bg-secondary);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-headline);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo::before {
    content: '';
    display: block;
    width: 12px;
    height: 12px;
    background: var(--highlight);
    border-radius: 50%;
    border: 2px solid var(--stroke);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
}

/* Forms */
.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--bg-tertiary);
    border-radius: var(--border-radius);
    background: var(--bg-main);
    color: var(--text-paragraph);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--stroke);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-headline);
}

/* Tables */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table th {
    background: var(--bg-secondary);
    color: var(--text-headline);
    font-weight: 600;
    padding: 1rem;
    text-align: left;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--bg-secondary);
    color: var(--text-paragraph);
}

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

/* Utility Classes */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }
.mb-3 { margin-bottom: 1.5rem; }

.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.flex-column { flex-direction: column; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* States for FSM */
.state-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 2px solid var(--stroke);
    background: var(--white);
    color: var(--text-headline);
}

.state-badge.active {
    background: var(--highlight);
}

.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    border: 2px solid var(--stroke);
    background: var(--bg-secondary);
    color: var(--text-headline);
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .focus-layer-1 h1 { font-size: 2.5rem; }
    .nav { flex-direction: column; gap: 1rem; }
    .nav-links { flex-direction: column; align-items: center; gap: 1rem; }
}
