* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f6f8;
    color: #202124;
}

.topbar {
    background: #202124;
    color: white;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-size: 22px;
    font-weight: 700;
}

.topbar a {
    color: white;
    margin-left: 16px;
    text-decoration: none;
}

.container {
    max-width: 1050px;
    margin: 32px auto;
    padding: 0 16px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
    margin-bottom: 20px;
}

.auth-card {
    max-width: 480px;
    margin: 40px auto;
}

h1, h2 {
    margin-top: 0;
}

label {
    display: block;
    font-weight: 700;
    margin-top: 14px;
}

input, select {
    width: 100%;
    padding: 11px;
    margin-top: 6px;
    border: 1px solid #c8cdd2;
    border-radius: 8px;
    font-size: 16px;
}

button, .button {
    display: inline-block;
    margin-top: 18px;
    background: #1f5eff;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 11px 16px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
}

.button.secondary {
    background: #4b5563;
}

.error {
    background: #ffe2e2;
    color: #8a1f1f;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.success {
    background: #dcfce7;
    color: #166534;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

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

.tracker-list {
    width: 100%;
    border-collapse: collapse;
}

.tracker-list th,
.tracker-list td {
    border-bottom: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

.footer {
    text-align: center;
    color: #666;
    padding: 24px;
}

@media (max-width: 760px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.wide-card {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

fieldset {
    border: 1px solid #d6d9dd;
    border-radius: 12px;
    padding: 18px;
    background: #fbfcfd;
}

legend {
    font-weight: 700;
    padding: 0 8px;
}

textarea {
    width: 100%;
    padding: 11px;
    margin-top: 6px;
    border: 1px solid #c8cdd2;
    border-radius: 8px;
    font-size: 16px;
    font-family: Arial, Helvetica, sans-serif;
}

.full-width {
    grid-column: 1 / -1;
}

.required {
    color: #b91c1c;
}

.muted {
    color: #5f6368;
}

.mix-row {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 12px;
    align-items: center;
    margin: 10px 0;
}

.check-label {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 0;
}

.check-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

@media (max-width: 760px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .mix-row {
        grid-template-columns: 1fr;
    }
}

textarea {
    width: 100%;
    padding: 11px;
    margin-top: 6px;
    border: 1px solid #c8cdd2;
    border-radius: 8px;
    font-size: 16px;
    font-family: Arial, Helvetica, sans-serif;
}

fieldset {
    border: 1px solid #d9dde3;
    border-radius: 10px;
    padding: 18px;
    margin: 0 0 18px 0;
}

legend {
    font-weight: 700;
    padding: 0 8px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.full-width {
    grid-column: 1 / -1;
}

.wide-card {
    max-width: 1100px;
}

.muted {
    color: #5f6368;
}

.required {
    color: #b91c1c;
}

.form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.mix-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}

.check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    margin-top: 0;
}

.check-label input {
    width: auto;
    margin-top: 0;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.small-button {
    margin-top: 0;
    padding: 6px 10px;
    font-size: 14px;
}

.danger-button {
    background: #b91c1c;
}

.inline-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.inline-form select {
    width: auto;
    min-width: 110px;
}

@media (max-width: 760px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .mix-row {
        grid-template-columns: 1fr;
    }
    .form-actions, .action-row, .inline-form {
        flex-direction: column;
        align-items: stretch;
    }
}
