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

:root {
    --primary-color: #0f4c81; /* Classic Trust Blue */
    --primary-hover: #0a355c;
    --secondary-color: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --bg-main: #ffffff;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --error-color: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-md: 8px;
    --radius-lg: 12px;
}

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

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

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
header {
    background-color: var(--bg-main);
    box-shadow: var(--shadow-sm);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

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

.btn-outline {
    background-color: #fff;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

.btn-add {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    font-size: 0.875rem;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    margin-top: 12px;
    font-weight: 600;
}
.btn-add:hover {
    background-color: #e2e8f0;
}

/* Hero Section */
.hero {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-main) 0%, var(--secondary-color) 100%);
    border-bottom: 1px solid var(--border-color);
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px auto;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 48px;
}

/* CPF Tracker Box */
.tracker-box {
    background-color: var(--bg-main);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    text-align: left;
}

.tracker-box h3 {
    margin-bottom: 16px;
    font-size: 1.25rem;
}

.input-group {
    display: flex;
    gap: 12px;
}

.input-group input {
    flex: 1;
}

/* Forms */
.form-container {
    background-color: var(--bg-main);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 40px;
    margin: 40px auto;
    max-width: 900px;
    border: 1px solid var(--border-color);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    padding: 12px 16px;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: #fff;
    transition: all 0.2s;
    outline: none;
    color: var(--text-primary);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.1);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

/* Dynamic Rows */
.dynamic-row {
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    padding: 24px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    position: relative;
    animation: fadeIn 0.3s ease;
}

.dynamic-row .remove-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    color: var(--error-color);
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
}

.dynamic-row .remove-btn:hover {
    text-decoration: underline;
}

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

/* Drag and Drop Zone */
.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 48px 24px;
    text-align: center;
    background-color: #fafafa;
    transition: all 0.2s ease;
    cursor: pointer;
    margin-bottom: 32px;
}

.drop-zone.dragover {
    background-color: rgba(15, 76, 129, 0.05);
    border-color: var(--primary-color);
}

.drop-zone-icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.drop-zone-text {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.drop-zone-hint {
    font-size: 0.875rem;
    color: #94a3b8;
}

.file-list {
    margin-top: 16px;
    display: none;
    flex-direction: column;
    gap: 8px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

.file-item .remove-file {
    color: var(--error-color);
    cursor: pointer;
    font-weight: 600;
}

/* Toast Container */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background-color: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 16px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    min-width: 300px;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 4px solid var(--text-primary);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success { border-left-color: var(--success-color); }
.toast.error { border-left-color: var(--error-color); }
.toast.info { border-left-color: var(--primary-color); }

.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .hero-actions { flex-direction: column; }
    .form-container { padding: 24px; margin: 20px; }
}
