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

body {
    font-family: Arial, sans-serif;
    font-size: 0.875rem;
    margin: 0;
    color: #333;
    background: #fff;
}

a {
    color: #000;
}

/* ---- Header ---- */

header {
    border-bottom: 1px solid #ccc;
    padding: 8px 16px;
    display: flex;
    align-items: baseline;
    gap: 24px;
    flex-wrap: wrap;
}

header h1 {
    color: #ccc;
    font-size: 1.2em;
    margin: 0;
}

nav {
    font-size: 0.85em;
}

nav a {
    margin: 0 4px;
}

/* ---- Main content ---- */

main {
    padding: 16px;
    max-width: 900px;
}

h2 {
    font-size: 1.1em;
    color: #555;
    margin-top: 1.2em;
}

h3 {
    font-size: 1em;
    margin-top: 1em;
}

/* ---- Alerts ---- */

.alert {
    padding: 8px 12px;
    margin-bottom: 12px;
    border-radius: 3px;
}

.alert-error {
    background: #d9534f;
    color: #fff;
}

.alert-success {
    background: #5cb85c;
    color: #fff;
}

/* ---- Forms ---- */

.login-form,
.upload-form,
.inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.login-form label,
.upload-form label,
.inline-form label {
    min-width: 80px;
    font-weight: bold;
}

.login-form input,
.upload-form input[type="file"],
.inline-form input[type="text"],
.inline-form input[type="password"] {
    padding: 4px 6px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 0.875rem;
}

button[type="submit"],
.btn {
    padding: 5px 12px;
    background: #444;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.875rem;
    text-decoration: none;
    display: inline-block;
}

button[type="submit"]:hover,
.btn:hover {
    background: #222;
}

.btn-link {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #7f7f7f;
    font-size: inherit;
    text-decoration: underline;
}

.btn-link:hover {
    color: #333;
}

/* ---- File list ---- */

.file-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.file-item {
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
}

.file-name {
    font-weight: bold;
    min-width: 200px;
    word-break: break-all;
}

.file-size {
    color: #999;
    min-width: 70px;
}

.file-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    font-size: 0.8em;
    color: #7f7f7f;
}

.file-actions a {
    color: #7f7f7f;
}

/* ---- Share box ---- */

.share-box {
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 12px 16px;
    margin: 12px 0;
}

.share-message {
    background: #fffbe6;
    border-left: 3px solid #f0ad4e;
    padding: 8px 12px;
    margin: 12px 0;
}

.email-template {
    border: 1px solid #ddd;
    padding: 12px 16px;
    margin-top: 16px;
    background: #fafafa;
}

/* ---- Info table (download page) ---- */

.info-table {
    border-collapse: collapse;
    margin-bottom: 12px;
}

.info-table th,
.info-table td {
    padding: 4px 12px 4px 0;
    text-align: left;
    vertical-align: top;
}

.info-table th {
    color: #777;
    font-weight: normal;
    white-space: nowrap;
}

/* ---- Download button ---- */

.download-btn {
    display: block;
    margin: 16px 0;
}

.download-btn img {
    max-width: 100%;
    max-height: 70vh;
}

/* ---- Create user section ---- */

.create-user {
    margin-bottom: 24px;
}

.user-list .file-item .file-actions a {
    color: #7f7f7f;
    font-size: 0.8em;
}
