body {
    font-family: Arial, sans-serif;
    max-width: 700px;
    margin: 40px auto;
    line-height: 1.4;
}
label {
    display: block;
    margin-top: 15px;
    font-weight: bold;
}
input[type="text"], textarea, select {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    margin-top: 5px;
}
textarea {
    min-height: 80px;
}
.error {
    background: #fbe3e4;
    color: #8a1f11;
    padding: 10px;
    margin-bottom: 10px;
}
.success {
    background: #e6efc2;
    color: #264409;
    padding: 10px;
    margin-bottom: 10px;
}
button {
    margin-top: 20px;
    padding: 10px 20px;
    cursor: pointer;
}

input[type="password"] {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    box-sizing: border-box;
}

.back-link {
    margin-top: 15px;
    display: inline-block;
}

h1 {
    margin-bottom: 10px;
}
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
a.button {
    display: inline-block;
    padding: 8px 14px;
    text-decoration: none;
    border: 1px solid #333;
    border-radius: 4px;
}
a.button:hover {
    background: #f0f0f0;
}
.auth-links a {
    margin-left: 10px;
    text-decoration: none;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
th, td {
    padding: 8px;
    border-bottom: 1px solid #ddd;
    vertical-align: top;
}
th {
    text-align: left;
    background: #f5f5f5;
}
.url a {
    word-break: break-all;
}
.category {
    white-space: nowrap;
}
.created {
    white-space: nowrap;
    font-size: 0.9em;
    color: #666;
}

/* ===== MOBILE STYLES ===== */
@media (max-width: 768px) {

    body {
        max-width: 100%;
        margin: 10px;
        font-size: 16px;   /* increase base text size */
    }

    label {
        font-size: 1rem;
    }

    input[type="text"], textarea, select {
        font-size: 1rem;
        padding: 12px;    /* bigger tap area */
    }

    textarea {
        min-height: 120px;
    }

    button,
    a.button {
        font-size: 1rem;
        padding: 12px 18px;
    }

    h1 {
        font-size: 1.4rem;
    }

    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .auth-links a {
        margin-left: 0;
        margin-right: 10px;
    }

    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    thead {
        display: none;  /* hide table headers */
    }

    tr {
        margin-bottom: 15px;
        border-bottom: 2px solid #ddd;
        padding-bottom: 10px;
    }

    td {
        padding: 6px 0;
        border: none;
        font-size: 0.95rem;
    }

    .category,
    .created {
        white-space: normal;
        font-size: 0.85rem;
    }
}
