@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --primary-dark: #3730a3;
    --accent: #f59e0b;
    --background: #f1f5f9;
    --surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --grad: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

header p {
    color: var(--text-muted);
    font-size: 1.125rem;
}

.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--accent));
}

/* Form Wizard */
.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    position: relative;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--border);
    z-index: 1;
    transform: translateY(-50%);
}

.step {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    z-index: 2;
    transition: all 0.3s ease;
    color: var(--text-muted);
}

.step.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.step.completed {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.form-step {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

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

.form-group.full-width {
    grid-column: span 2;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: var(--background);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: white;
}

.btn-group {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.2);
    opacity: 1 !important;
}

.btn-primary:hover {
    background: var(--primary-dark);
    /* Stable: No movement or shadow changes */
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--background);
}

/* Signature Pad */
.signature-container {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    background: var(--background);
    margin-bottom: 1rem;
}

canvas#signature-pad {
    width: 100%;
    height: 200px;
    background: white;
    cursor: crosshair;
}

.signature-controls {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

/* Data Manager Panel */
.data-manager-trigger {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    transition: all 0.3s ease;
    opacity: 0.3; /* Discreet by default */
}

.data-manager-trigger:hover {
    opacity: 1;
    transform: scale(1.1);
    background: var(--primary-hover);
}

.data-manager-panel {
    position: fixed;
    bottom: 5.5rem;
    right: 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 100;
    animation: slideUp 0.3s ease-out;
}

.data-manager-panel.active {
    display: flex;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    background: var(--background);
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
}

.btn-sm:hover {
    background: var(--border);
}

/* Responsive */
@media (max-width: 640px) {
    .grid {
        grid-template-columns: 1fr;
    }
    .form-group.full-width {
        grid-column: span 1;
    }
}
.error-field {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

.validation-hint {
    color: #ef4444;
    font-size: 0.7rem;
    margin-top: 0.25rem;
    font-weight: 500;
}
/* Admin Login Specifics */
.login-card {
    max-width: 450px;
    margin: 4rem auto;
    padding: 3rem;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.login-title {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--text-main);
}

.btn-login {
    width: 100%;
    margin-top: 1.5rem;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    background: #5c4df2; /* Match the purple/blue in screenshot */
    box-shadow: 0 8px 20px rgba(92, 77, 242, 0.25);
}

.btn-login:hover {
    background: #4a3cd9;
    transform: translateY(-1px);
}

.admin-container header h1 {
    color: #5c4df2;
    font-size: 2.5rem;
}

#admin-login-section input {
    background: #edf2f7;
    border: 1px solid transparent;
}

#admin-login-section input:focus {
    background: white;
    border-color: #5c4df2;
}
