/* Base Reset & Variables */
:root {
    --bg-color: #f1f5f9;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #475569;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --border-color: #cbd5e1;
    --error-color: #dc2626;
    --success-color: #15803d;
    --code-bg: #e2e8f0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    padding: 2rem 1rem;
    min-height: 100vh;
    /* Static, professional background */
    background-color: #f1f5f9;
    background-image: radial-gradient(circle at 50% -20%, #e0f2fe 0%, #f1f5f9 70%);
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

.header-main {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
    text-align: left;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.brand-logo {
    width: 64px;
    height: 64px;
    display: block;
}

.header-text-block {
    display: flex;
    flex-direction: column;
}

h1 {
    font-size: 2rem;
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.subtitle {
    color: var(--text-muted);
    margin-top: 0.35rem;
    font-size: 1rem;
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
}

h2, h3 {
    margin-bottom: 1.25rem;
    font-weight: 600;
}

/* Instructions Panel - Updated for Modern Look */
.instructions-panel {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 6px solid var(--primary);
    padding: 1.75rem 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
}

.instructions-list {
    margin-left: 0;
    padding-left: 1.5rem;
}

.instructions-list li {
    margin-bottom: 0.85rem;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.5;
}

.instructions-list li strong {
    color: var(--text-main);
}

.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.input-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

input[type="text"],
input[type="password"],
input[type="url"],
textarea {
    width: 100%;
    padding: 0.75rem;
    padding-right: 3rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.15s ease-in-out;
    background-color: #ffffff;
    color: var(--text-main);
}

input:focus,
textarea:focus {
    outline: 3px solid #f59e0b;
    outline-offset: 2px;
    border-color: var(--primary);
}

textarea {
    resize: vertical;
    font-family: monospace;
    font-size: 0.9rem;
    padding-right: 0.75rem;
}

input[type="file"] {
    display: block;
    width: 100%;
    font-size: 0.9rem;
    color: var(--text-muted);
    padding-right: 0.75rem;
    padding-top: 0.25rem;
}

#toggleVisibility {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    height: 2rem;
    width: 2.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: color 0.2s;
    border-radius: 4px;
    padding: 0;
    z-index: 2;
}

#toggleVisibility:focus {
    outline: 2px solid #f59e0b;
    outline-offset: 1px;
}

#toggleVisibility:hover {
    color: var(--text-main);
}

button {
    display: inline-block;
    width: 100%;
    background-color: var(--primary);
    color: white;
    font-weight: 700;
    padding: 0.85rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.15s ease-in-out;
}

button:focus {
    outline: 3px solid #f59e0b;
    outline-offset: 2px;
}

button:hover {
    background-color: var(--primary-hover);
}

button:disabled {
    background-color: #64748b;
    color: #cbd5e1;
    cursor: not-allowed;
}

/* Status Message & Spinner */
.status-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-align: center;
    padding: 1.5rem;
    color: #1d4ed8;
    font-weight: 600;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #cbd5e1;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }

/* Audit Result Item Colors */
.audit-list { list-style: none; margin-top: 1rem; }
.failure-item { 
    background-color: #fef2f2; 
    border-left: 4px solid var(--error-color); 
    padding: 1rem; 
    margin-bottom: 0.75rem; 
    color: #991b1b;
}
.pass-item { 
    background-color: #f0fdf4; 
    border-left: 4px solid var(--success-color); 
    padding: 1rem; 
    margin-bottom: 0.75rem; 
    color: #166534;
}

/* Enhanced Footer Styling */
footer {
    width: 100%;
    margin-top: 4rem;
    padding: 1.5rem 0;
    border-top: 1px solid #cbd5e1;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-text { 
    color: var(--text-muted); 
    font-size: 0.9rem; 
}

.footer-link { 
    color: #1d4ed8; 
    font-size: 0.9rem; 
    text-decoration: underline; 
    transition: color 0.15s ease-in-out; 
}

.footer-link:hover,
.footer-link:focus {
    color: var(--primary-hover);
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
}

@media (max-width: 480px) {
    .header-main { flex-direction: column; text-align: center; gap: 0.75rem; }
    .footer-content { flex-direction: column; gap: 0.75rem; }
}

@media print {
    body { background: white !important; color: black; padding: 0; }
    .config-panel, .input-panel, button, #toggleVisibility, .status-message, .logo-container, .instructions-panel, footer { display: none !important; }
    .card { border: none; box-shadow: none; padding: 0; }
}
