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

:root {
    --bg-color: #f3f4f6; /* Light gray background */
    --card-bg: #ffffff; /* White cards */
    --primary-color: #facc15; /* Vibrant yellow */
    --primary-hover: #eab308; /* Darker yellow for hover */
    --text-main: #111827; /* Near black text */
    --text-muted: #6b7280; /* Gray text for secondary info */
    --border-color: #d1d5db; /* Light gray border */
    --error-color: #ef4444; /* Red for errors */
    --font-family: 'Outfit', system-ui, -apple-system, sans-serif;
}

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

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

.container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.container-admin {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Typography */
h1, h2, h3 {
    font-weight: 700;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2rem;
    text-align: center;
    color: #000000; /* Black for titles */
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Forms */
.card {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
}

.required-star {
    color: var(--error-color);
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: #ffffff;
    color: var(--text-main);
    font-size: 1rem;
    font-family: var(--font-family);
    transition: all 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.3); /* Yellow glow */
}

/* Checkbox & Radio */
.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: 400;
}

/* Buttons */
.btn {
    display: inline-block;
    width: 100%;
    padding: 14px 24px;
    border-radius: 8px;
    border: none;
    background-color: var(--primary-color);
    color: #000000; /* Black text on yellow background */
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    text-decoration: none;
}

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

.btn:active {
    transform: scale(0.98);
}

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

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

.btn-danger {
    background-color: var(--error-color);
    color: white;
}
.btn-danger:hover {
    background-color: #dc2626;
}

.btn-sm {
    width: auto;
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Utilities */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); font-size: 0.9rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.flex { display: flex; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }

/* Admin specifics */
.admin-header {
    background-color: var(--card-bg);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
    border-radius: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.admin-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #000000;
}

.nav-links {
    display: flex;
    gap: 16px;
}
.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
}
.nav-links a:hover {
    color: var(--primary-hover);
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

th {
    background-color: #f9fafb;
    font-weight: 600;
    color: var(--text-main);
    text-transform: uppercase;
    font-size: 0.85rem;
}

tr:hover {
    background-color: #f3f4f6;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    background-color: var(--primary-color);
    color: #000000;
}

/* Builder specifics */
.field-item {
    background-color: #f9fafb;
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    position: relative;
}

.field-item .actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

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

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: #000000;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}
.toast.show {
    opacity: 1;
    transform: translateY(0);
}
