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

body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #f4f6f8;
    color: #333;
    height: 100vh;
}

.page {
    display: flex;
    height: 100vh;
}

.button {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    color: white;
    margin-right: 0.4rem;
    cursor: pointer;
}

.button-back {
    background-color: #6b7280;
}

.button-delete {
    background-color: #ef4444;
}

.button-edit {
    background-color: #f59e0b;
}

/**
 * LOGIN & REGISTER
 */

.login-register-page {
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-title {
    margin-bottom: 0.5rem;
}

.login-info {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.login-form {
    display: flex;
    flex-direction: column;
}

.login-label {
    text-align: left;
    margin: 0.5rem 0 0.25rem;
    font-weight: 500;
}

.login-input {
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.login-checkbox {
    text-align: left;
    padding-bottom: 0.5em;
}

.login-btn {
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    margin-bottom: 0.5rem;
}

.login-primary-btn {
    background-color: #007bff;
    color: white;
}

.login-primary-btn:hover {
    background-color: #0056b3;
}

.login-secondary-btn {
    background-color: #e2e6ea;
    color: #333;
    text-decoration: none;
}

.login-secondary-btn:hover {
    background-color: #d6d8db;
    text-decoration: none;
}

.login-secondary-btn:visited {
    text-decoration: none;
}

/**
 * DASHBOARDS
 */

.sidebar {
    width: 240px;
    background-color: #1f2937;
    color: white;
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 2rem;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nav-link {
    color: #cbd5e1;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.nav-link:hover {
    background-color: #374151;
}

.nav-dropdown {
    position: relative;
    margin-top: 1rem;
}

.dropdown-toggle {
    width: 100%;
    background: none;
    border: none;
    color: white;
    text-align: left;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 1rem;
}

.dropdown-menu {
    display: none;
    flex-direction: column;
    position: relative;
    margin-left: 1rem;
    margin-top: 0.5rem;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    color: #d1d5db;
    text-decoration: none;
    transition: background 0.2s;
    border-radius: 5px;
}

.dropdown-item:hover {
    background-color: #374151;
    color: white;
}

.nav-dropdown.open .dropdown-menu {
    display: flex;
}

.main-content {
    flex-grow: 1;
    padding: 2rem;
    overflow-y: auto;
}

.header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #ccc;
    padding-bottom: 0.5rem;
}

.content {
    font-size: 1rem;
}

/**
 * TABLES
 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.table thead {
    background-color: #2563eb;
    color: white;
}

.table th, .table td {
    padding: 0.75rem 1rem;
    text-align: left;
}

.table tr:nth-child(even) {
    background-color: #f9fafb;
}

.table-button-view {
    background-color: #38bdf8;
}

.table-button-new {
    background-color: #10B981;
}

.delete-form-inline {
    display: inline;
    margin: 0;
}

/**
 * FORMS
 */

.form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-widget {
    width: 100%;
    padding: 0.6rem 0.8rem;
    font-size: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    transition: border-color 0.3s;
}

.form-widget:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.form-select {
    background-color: white;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg fill='none' stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    background-size: 1.2em;
    cursor: pointer;
}

.form-select-multi {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.form-checkbox input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin: 0;
}

.form-checkbox label {
    margin: 0;
    line-height: 1.2;
    font-size: 0.95rem;
}

.form-collection-field {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.form-button-save {
    background-color: #10b981;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.form-button-save:hover {
    background-color: #059669;
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
}