*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    min-height: 100vh;

    font-family: "Segoe UI", sans-serif;
    line-height: 1.5;

    background: #f4f6f8;
    color: #222;
}


h1,
h2,
h3,
h4,
p {
    margin: 0;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.1rem;
}

a {
    color: #3b82f6;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.page-container {
    width: min(1200px, 92%);
    margin: 0 auto;
}

main {
    width: min(1200px, 92%);
    margin: 2rem auto;
}

header {
    background: #1f2937;
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

nav {
    width: min(1200px, 92%);
    margin: 0 auto;

    min-height: 80px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

nav h1 {
    font-size: 1.5rem;
}

nav form {
    margin: 0;
}

nav button {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font-size: .95rem;
}

nav button:hover {
    opacity: .8;
}

#page-topic {
    width: min(1200px, 92%);
    margin: 2rem auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;

    flex-wrap: wrap;
}

#page-topic h2 {
    margin: 0;
}

#page-topic .actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

button {
    border: none;
    border-radius: 8px;
    padding: .8rem 1.2rem;

    cursor: pointer;

    background: #2563eb;
    color: white;

    transition: .2s;
}

button:hover {
    background: #1d4ed8;
}

button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

input,
select,
textarea {
    width: 100%;
    padding: .85rem 1rem;

    border: 1px solid #d1d5db;
    border-radius: 8px;

    font: inherit;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #2563eb;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;

    box-shadow:
        0 4px 12px rgba(0,0,0,.06);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

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

thead {
    background: #f9fafb;
}

tbody tr {
    border-top: 1px solid #e5e7eb;
}

tbody tr:hover {
    background: #f9fafb;
}

.modal {
    position: fixed;
    inset: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    background: rgba(0,0,0,.45);
    padding: 1rem;
}

.modal-content {
    width: 100%;
    max-width: 700px;

    background: white;
    border-radius: 12px;

    padding: 2rem;

    max-height: 90vh;
    overflow-y: auto;
}

.close {
    float: right;
    cursor: pointer;
    font-size: 1.5rem;
}

.auth-section {
    min-height: calc(100vh - 80px);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 2rem;
}

.auth-card {
    width: 100%;
    max-width: 450px;

    background: white;

    padding: 2rem;
    border-radius: 12px;

    box-shadow:
        0 8px 24px rgba(0,0,0,.08);
}

.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
}

.hidden {
    display: none;
}

.text-center {
    text-align: center;
}