:root {
    --primary: #0f172a;
    --accent: #3b82f6; /* Vivid Blue */
    --accent-hover: #2563eb;
    --bg: #f1f5f9;
    --white: #ffffff;
    --border: #e2e8f0;
    --text-muted: #64748b;
    --radius: 12px;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}
body {
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Premium Inputs */
form input, form select, form textarea {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-sizing: border-box;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: #fff;
}

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

form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #334155;
    font-size: 0.9rem;
}

/* Card Upgrade */
.card {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

/* Toggle Switch */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
}
.switch-label {
    margin-bottom: 0 !important;
}
.switch-wrapper {
    background: #e2e8f0;
    border-radius: 20px;
    padding: 3px;
    display: inline-flex;
    position: relative;
}
.switch-wrapper input[type="radio"] {
    display: none;
}
.switch-btn {
    padding: 6px 16px;
    border-radius: 18px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    transition: all 0.3s ease;
    user-select: none;
}
.switch-wrapper input[type="radio"]:checked + .switch-btn {
    background: var(--white);
    color: var(--accent);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Modal Improvements */
.modal-content {
    border-radius: var(--radius);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: none !important;
    animation: slideIn 0.3s ease-out;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.template-item {
    border: 2px solid transparent !important;
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s;
}
.template-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: var(--accent) !important;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: var(--accent);
    color: var(--white);
    text-decoration: none;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background 0.2s;
}
.btn:hover {
    background: var(--accent-hover);
}
.btn-secondary {
    background: #e2e8f0;
    color: #334155;
}
.btn-secondary:hover {
    background: #cbd5e1;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}

.main-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
}

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

.main-header h1 a {
    text-decoration: none;
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: bold;
}

nav a {
    margin-left: 20px;
    text-decoration: none;
    color: var(--accent);
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 20px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--white);
}

th {
    background: #f8fafc;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    font-size: 0.9rem;
}

tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: #f8fafc;
}

/* Premium Table */
.premium-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 20px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.premium-table th {
    background: #f8fafc;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.premium-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    background: white;
}

.premium-table tr:last-child td {
    border-bottom: none;
}

.premium-table input {
    border: 1px solid transparent;
    background: transparent;
    margin-bottom: 0;
    padding: 8px;
    border-radius: 6px;
    font-family: var(--font-body);
}

.premium-table input:focus {
    background: #fff;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.premium-table input:hover {
    background: #f8fafc;
}



/* Helper Buttons */
.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 15px;
}

.btn-danger {
    background: #ef4444;
    color: white;
}
.btn-danger:hover {
    background: #dc2626;
}

.flex-row {
    display: flex;
    gap: 15px;
}
.flex-col {
    flex: 1;
}



.main-footer {
    text-align: center;
    font-size: 0.8rem;
    color: #888;
    padding: 20px 0;
}

/* Autocomplete Styles */
.autocomplete-container {
    position: relative;
}

.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: none;
}

.autocomplete-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

.autocomplete-item strong {
    font-weight: 600;
}
