/* ========================================
   TradieLedger Styles
   High visibility form inputs & professional design
   ======================================== */

/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
    /* Colors */
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary: #10b981;
    --secondary-dark: #059669;
    --danger: #ef4444;
    --warning: #f59e0b;
    
    /* Neutrals */
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    
    /* Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --bg-dark: #1f2937;
    
    /* Borders */
    --border-color: #e5e7eb;
    --border-color-hover: #d1d5db;
    --border-color-focus: #2563eb;
    
    /* Form Input Colors - HIGH VISIBILITY */
    --input-bg: #ffffff;
    --input-text: #111827;
    --input-placeholder: #6b7280;
    --input-border: #d1d5db;
    --input-border-focus: #2563eb;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Typography */
    --font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   CONTAINER & LAYOUT
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* ========================================
   NAVIGATION
   ======================================== */
.navbar {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: var(--spacing-lg) 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.logo-icon {
    font-size: 1.75rem;
}

.logo-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: var(--spacing-xl);
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.2s ease;
    padding: var(--spacing-sm) 0;
    position: relative;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #3b82f6 100%);
    padding: var(--spacing-2xl) 0;
    color: white;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xl);
    opacity: 0.95;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin-bottom: var(--spacing-xl);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.2);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: 50px;
    font-size: 0.95rem;
    backdrop-filter: blur(10px);
}

.shield-icon {
    color: var(--secondary);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-family);
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.9);
}

.btn-large {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
}

/* ========================================
   FEATURES SECTION
   ======================================== */
.features {
    padding: var(--spacing-2xl) 0;
    background: var(--bg-primary);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-2xl);
    color: var(--text-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
}

.feature-card {
    background: var(--bg-secondary);
    padding: var(--spacing-xl);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========================================
   FORM SECTION
   ======================================== */
.form-section {
    padding: var(--spacing-2xl) 0;
    background: var(--bg-secondary);
    min-height: calc(100vh - 80px);
}

.form-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-primary);
    padding: var(--spacing-2xl);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
}

.form-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.form-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.form-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

.confidential-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary-dark);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* ========================================
   FORM ELEMENTS - HIGH VISIBILITY
   ======================================== */
.payslip-form,
.calculator-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.form-group-full {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.required {
    color: var(--danger);
    font-weight: 700;
}

.optional-label {
    color: var(--text-light);
    font-weight: 400;
    font-size: 0.875rem;
}

/* HIGH VISIBILITY INPUTS */
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: var(--font-family);
    border: 2px solid var(--input-border);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--input-text);
    transition: all 0.2s ease;
    font-weight: 500;
}

/* CRITICAL: Visible placeholder text */
.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--input-placeholder);
    opacity: 1;
    font-weight: 400;
}

/* CRITICAL: Visible select options */
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23111827' d='M4.5 6L8 9.5L11.5 6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px;
    padding-right: 2.5rem;
    cursor: pointer;
}

/* Make select options highly visible */
.form-select option {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 0.5rem;
    font-weight: 500;
}

.form-select option:first-child {
    color: var(--text-secondary);
    font-weight: 400;
}

/* Focus states - clear visual feedback */
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--input-border-focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Hover states */
.form-input:hover,
.form-select:hover,
.form-textarea:hover {
    border-color: var(--border-color-hover);
}

/* Disabled state */
.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
    background: var(--bg-tertiary);
    cursor: not-allowed;
    opacity: 0.6;
}

.form-hint {
    font-size: 0.875rem;
    color: var(--text-light);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

/* ========================================
   FILE UPLOAD
   ======================================== */
.file-upload-wrapper {
    position: relative;
}

.file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.file-upload-display {
    border: 2px dashed var(--input-border);
    border-radius: 12px;
    padding: var(--spacing-2xl);
    text-align: center;
    background: var(--bg-secondary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-display:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.upload-icon {
    color: var(--primary);
    margin-bottom: var(--spacing-md);
}

.upload-icon.success {
    color: var(--secondary);
}

.upload-text {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.upload-hint {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* ========================================
   FORM ACTIONS
   ======================================== */
.form-actions {
    margin-top: var(--spacing-lg);
    display: flex;
    justify-content: center;
}

.form-disclaimer {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    text-align: center;
}

/* ========================================
   CALCULATOR RESULTS
   ======================================== */
.calculator-results {
    margin-top: var(--spacing-2xl);
    padding: var(--spacing-xl);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-radius: 12px;
    border: 2px solid var(--primary-light);
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.results-header h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.results-header p {
    color: var(--text-secondary);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.result-card {
    background: white;
    padding: var(--spacing-lg);
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.result-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
}

.result-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.results-breakdown {
    background: white;
    padding: var(--spacing-lg);
    border-radius: 10px;
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
}

.results-breakdown h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.breakdown-item:last-child {
    border-bottom: none;
}

.results-disclaimer {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: var(--spacing-md);
    border-radius: 8px;
}

.results-disclaimer p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.results-disclaimer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
}

/* ========================================
   CTA SECTION
   ======================================== */
.cta-section {
    padding: var(--spacing-2xl) 0;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    color: white;
}

.cta-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.cta-content p {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-xl);
    opacity: 0.95;
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about {
    padding: var(--spacing-2xl) 0;
    background: var(--bg-secondary);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-content p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    margin-top: var(--spacing-md);
}

.footer-links,
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.footer-links h4,
.footer-contact h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.footer-links a,
.footer-contact a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-contact a:hover {
    color: white;
}

.contact-link {
    color: var(--primary-light) !important;
    font-weight: 500;
}

.footer-contact p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .nav-links {
        gap: var(--spacing-md);
    }
    
    .nav-link {
        font-size: 0.9rem;
    }
    
    .form-container {
        padding: var(--spacing-lg);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .result-value {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 1.125rem;
    }
    
    .nav-links {
        gap: var(--spacing-sm);
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .btn-large {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}