:root {
    /* Colors - Professional & Trustworthy */
    --primary-color: #2c3e50;    /* Dark Blue-Gray */
    --accent-color: #3498db;     /* Action Blue */
    --accent-hover: #2980b9;     /* Darker Action Blue */
    --bg-color: #f8f9fa;         /* Clean Light Gray */
    --surface-color: #ffffff;    /* White */
    --text-color: #333333;       /* Dark Gray Text */
    --text-light: #666666;       /* Light Gray Text */
    --border-color: #e0e0e0;     /* Subtle Borders */
    --success-color: #27ae60;    /* Green */
    --error-color: #e74c3c;      /* Red */
    
    /* Spacing */
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    
    /* Typography */
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --radius: 4px;
    --shadow: 0 2px 4px rgba(0,0,0,0.05);
}

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

body {
    font-family: var(--font-stack);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

h1, h2, h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

h1 { font-size: 2rem; font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 600; margin-top: var(--spacing-lg); }
h3 { font-size: 1.2rem; font-weight: 600; }

p { margin-bottom: var(--spacing-md); }

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.site-header {
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: var(--spacing-md) 0;
    box-shadow: var(--shadow);
}

.branding .site-title {
    margin: 0;
    font-size: 1.5rem;
}

.branding .site-title a {
    color: var(--primary-color);
    text-decoration: none;
}

.branding .site-tagline {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
}

.site-nav {
    margin-top: var(--spacing-sm);
}

.site-nav a {
    color: var(--text-color);
    margin-right: var(--spacing-md);
    font-weight: 500;
}

.site-nav a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

/* Main Content */
.site-content {
    flex: 1;
    padding: var(--spacing-lg) 15px;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
    color: var(--primary-color);
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    text-align: center;
    text-decoration: none;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    text-decoration: none;
}

.btn-secondary {
    background-color: #ecf0f1;
    color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: #bdc3c7;
    text-decoration: none;
}

/* Invoice Preview Box */
.invoice-preview {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    font-size: 0.9rem;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.invoice-header h3 {
    margin: 0;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.invoice-body hr {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 1rem 0;
}

.invoice-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.invoice-total {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 1rem;
    color: var(--primary-color);
}

/* Ad Box - Neutral & AdSense Friendly */
.ad-wrapper {
    margin: 2rem 0;
    text-align: center;
}

.ad-placeholder {
    display: inline-block;
    width: 100%;
    max-width: 728px; /* Leaderboard */
    min-height: 90px;
    background-color: #ecf0f1; /* Neutral Gray */
    border: 1px solid #dfe6e9;
    color: #95a5a6;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Footer */
.site-footer {
    background-color: var(--primary-color);
    color: #ecf0f1;
    padding: 2rem 0;
    text-align: center;
    margin-top: auto;
}

.site-footer p {
    margin-bottom: 0.5rem;
}

.site-footer .disclaimer {
    font-size: 0.8rem;
    color: #bdc3c7;
    max-width: 800px;
    margin: 1rem auto 0;
    line-height: 1.4;
}

/* Utilities */
.text-center { text-align: center; }

/* Responsive */
@media (min-width: 768px) {
    .site-header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .branding {
        text-align: left;
    }
    
    .site-nav {
        margin-top: 0;
    }
}
