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

:root {
    --bg-dark: #0f172a;
    --card-bg: #1e293b;
    --card-border: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-blue: #3b82f6;
    --accent-blue-hover: #2563eb;
    --accent-red: #ef4444;
    --accent-red-hover: #dc2626;
    --accent-green: #22c55e;
    --accent-green-hover: #16a34a;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Container de Login */
.login-container {
    margin: auto;
    width: 100%;
    max-width: 440px;
    padding: 40px;
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.login-header img {
    height: 90px;
    margin-bottom: 24px;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.login-header p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* Campos de Formulário */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 14px;
    background-color: #0f172a;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Botões */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 24px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.btn-primary {
    background-color: var(--accent-blue);
    color: white;
}

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

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

/* Estrutura do Dashboard */
header {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--card-border);
    padding: 16px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-brand img {
    height: 50px;
}

.header-brand h1 {
    font-size: 20px;
    font-weight: 700;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-user span {
    font-size: 14px;
    color: var(--text-secondary);
}

.btn-logout {
    background-color: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.btn-logout:hover {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: var(--accent-red);
    color: var(--accent-red);
}

main {
    flex: 1;
    padding: 40px;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 32px;
    align-items: start;
}

/* Painel Lateral / Formulário de Adicionar */
.add-user-panel {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 24px;
}

.add-user-panel h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Painel de Conteúdo Principal */
.users-table-panel {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 24px;
    overflow-x: auto;
}

.users-table-panel h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Tabela de Usuários */
table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th, td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--card-border);
    font-size: 13px;
}

th {
    font-weight: 600;
    color: var(--text-secondary);
    background-color: rgba(15, 23, 42, 0.4);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05em;
}

tr:hover td {
    background-color: rgba(51, 65, 85, 0.2);
}

/* Switches / Toggles */
.switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #475569;
    transition: .3s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent-blue);
}

input:checked + .slider:before {
    transform: translateX(16px);
}

/* Ações */
.btn-delete {
    background-color: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background-color 0.2s;
}

.btn-delete:hover {
    color: var(--accent-red);
    background-color: rgba(239, 68, 68, 0.1);
}

/* Alertas de Notificação */
.notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification-success {
    background-color: var(--accent-green);
}

.notification-error {
    background-color: var(--accent-red);
}
