@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #73B61C;
    /* Green */
    --primary-hover: #5FA015;
    /* Green Darker */
    --secondary-color: #004A87;
    /* Blue */
    --background-color: #ffffff;
    /* White */
    --surface-color: #ffffff;
    --text-primary: #1e293b;
    /* Slate 800 */
    --text-secondary: #64748b;
    /* Slate 500 */
    --success-color: #10b981;
    /* Emerald 500 */
    --warning-color: #f59e0b;
    /* Amber 500 */
    --danger-color: #ef4444;
    /* Red 500 */
    --border-color: #e2e8f0;
    /* Slate 200 */
    --radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 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);
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.page {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Components */
.card {
    background: var(--surface-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 0.875rem;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: var(--secondary-color);
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--surface-color);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Utilities */
.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mt-4 {
    margin-top: 1rem;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.gap-4 {
    gap: 1rem;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.w-full {
    width: 100%;
}

/* Badge */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-open {
    background-color: #dcfce7;
    color: #166534;
}

.badge-closed {
    background-color: #f1f5f9;
    color: #475569;
}

.badge-pending {
    background-color: #fef3c7;
    color: #b45309;
}

/* Navbar */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
}

.brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
}

.brand span {
    color: var(--primary-color);
}

/* Loading */
.loading-progress {
    position: relative;
    display: block;
    width: 100%;
    height: 4px;
    margin: 2rem 0;
    border-radius: 2px;
    background-color: #e2e8f0;
    overflow: hidden;
}

.loading-progress::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 50%;
    background-color: var(--primary-color);
    animation: progress-slide 1s infinite ease-in-out;
}

@keyframes progress-slide {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(200%);
    }
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 3rem;
    margin-top: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 1rem;
    width: 2px;
    background-color: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-date-label {
    position: absolute;
    left: -2.35rem;
    top: -0.75rem;
    background: var(--surface-color);
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    box-shadow: var(--shadow-sm);
}

.timeline-marker {
    position: absolute;
    /* 3rem (padding) + left = 1rem (line pos) + 1px (line center) - 6px (half marker) 
       left = 1rem - 3rem - 5px = -2rem - 5px approx -2.31rem */
    left: -2.31rem;
    top: 1.5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 2px solid var(--surface-color);
    box-shadow: 0 0 0 2px var(--primary-color);
    z-index: 1;
}

.timeline-marker.gray {
    width: 10px;
    /* Smaller */
    height: 10px;
    /* Center calculation: 
       Target: 17px. 
       Start: 48px. 
       Offset: 17 - 4 - 48 = -35px. 
       -35px / 16 ~ -2.18rem */
    left: -2.25rem;
    background-color: var(--border-color);
    /* Same as line */
    box-shadow: none;
    /* No ring for simple dots */
    border: 2px solid var(--surface-color);
    /* Still keeps whitespace separation from line if needed, or remove */
}