/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    transition: background-color var(--trans-med), color var(--trans-med);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--trans-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 0.5em;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 1.8rem;
}

h3 {
    font-size: 1.4rem;
}

/* --- Layout Wrappers --- */
.page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.main-content {
    padding-top: 20px;
    padding-bottom: 60px;
}

/* --- V3 Card Utilities (Clean/Professional) --- */
.card,
.glass-card,
.glass-panel {
    /* Keeping legacy names for compatibility */
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--br-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    transition: var(--trans-med);
}

.card:hover,
.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-secondary);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--br-md);
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    border: none;
    text-align: center;
    transition: var(--trans-fast);
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary);
}

.btn-outline:hover {
    background: var(--accent-primary);
    color: white;
}

/* --- Forms --- */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: var(--br-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--trans-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(140, 198, 63, 0.2);
    /* Lime shadow */
}

@keyframes fillProgress {
    from {
        width: 0;
    }
}

.progress-bar-fill,
.mini-fill {
    animation: fillProgress 1s ease-out forwards;
}

/* --- Utilities --- */
.text-center {
    text-align: center;
}

.d-flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mt-1 {
    margin-top: 1rem;
}

/* Hidden utility matching Bootstrap d-none */
.d-none {
    display: none !important;
}

.d-md-inline {
    display: inline !important;
}

/* --- Footer --- */
.site-footer {
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
    margin-top: auto;
}