:root {
    --bg-color: #0f111a;
    --panel-bg: rgba(25, 28, 41, 0.65);
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --danger: #ef4444;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.08);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15), transparent 25%);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

.screen {
    display: none;
    height: 100%;
    width: 100%;
}

.screen.active {
    display: flex;
    flex-direction: column;
}

.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* LOGIN */
#login-screen {
    justify-content: center;
    align-items: center;
}

.login-box {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    text-align: center;
}

.logo {
    margin-bottom: 30px;
}

.logo-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 16px;
    margin: 0 auto 15px;
}

.logo-icon-small {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 8px;
    margin-right: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
    margin-bottom: 20px;
}

.form-group label {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"] {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

button {
    font-family: inherit;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
    width: 100%;
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

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

.error-text {
    color: var(--danger);
    font-size: 14px;
    margin-top: 15px;
}

/* DASHBOARD */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    margin: 20px;
    border-radius: 12px;
}

.logo-small {
    display: flex;
    align-items: center;
}

.dashboard-main {
    display: flex;
    flex: 1;
    gap: 20px;
    padding: 0 20px 20px;
    overflow: hidden;
}

.sidebar {
    width: 300px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.preset-list {
    list-style: none;
    margin-top: 15px;
    flex: 1;
    overflow-y: auto;
}

.preset-list li {
    padding: 12px 15px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.preset-list li:hover {
    background: rgba(255, 255, 255, 0.1);
}

.preset-list li.active {
    background: var(--primary);
    color: white;
}

.editor-area {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.welcome-editor {
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 18px;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.editor-header .actions {
    display: flex;
    gap: 10px;
}

.editor-header .actions button {
    width: auto;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

/* Toggles */
.toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: var(--text-main) !important;
}

.toggle-label input {
    display: none;
}

.toggle-slider {
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    position: relative;
    margin-right: 12px;
    transition: 0.3s;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: 0.3s;
}

.toggle-label input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle-label input:checked + .toggle-slider::after {
    left: 23px;
}

/* Hide native Edge/Chrome password eye icon */
input[type=password]::-ms-reveal, input[type=password]::-ms-clear { display: none; }
input[type=password]::-webkit-contacts-auto-fill-button { visibility: hidden; display: none !important; pointer-events: none; height: 0; width: 0; margin: 0; }

/* MODAL OVERLAY */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    padding: 30px;
    position: relative;
}

/* Extra form inputs styling (select, email, date, number, file) */
.form-group select,
.form-group input[type="email"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group input[type="file"] {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
}

.form-group select:focus,
.form-group input[type="email"]:focus,
.form-group input[type="date"]:focus,
.form-group input[type="number"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.form-group select option {
    background: #1a1d2e;
    color: white;
}

/* Data table */
.data-table th {
    color: var(--text-muted);
    font-weight: 600;
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.data-table tr:hover {
    background: rgba(255,255,255,0.03);
}
