:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --danger: #dc2626;
    --danger-hover: #b91c1c;
    --success: #16a34a;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --radius: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

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

h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--gray-700);
}

.card {
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover {
    background: var(--danger-hover);
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

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

label {
    display: block;
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    color: var(--gray-700);
}

/* Upload area */
.drop-zone {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--primary);
    background: #eff6ff;
}

.drop-zone p {
    color: var(--gray-500);
    margin-top: 0.5rem;
}

.drop-zone .icon {
    font-size: 2.5rem;
}

/* Progress */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 1rem;
    display: none;
}

.progress-bar .fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s;
}

.status-message {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    display: none;
}

.status-message.success {
    background: #dcfce7;
    color: #166534;
    display: block;
}

.status-message.error {
    background: #fee2e2;
    color: #991b1b;
    display: block;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.875rem;
}

th {
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

tr:hover {
    background: var(--gray-50);
}

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal h2 {
    margin-bottom: 1rem;
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.header .user-info {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* Copy link */
.copy-btn {
    background: none;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    font-size: 0.8rem;
}

.copy-btn:hover {
    background: var(--gray-100);
}

.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--gray-900);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 100;
}

.toast.show {
    opacity: 1;
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }
    h1 {
        font-size: 1.375rem;
    }
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--primary);
    color: white;
}

.badge-muted {
    background: var(--gray-200);
    color: var(--gray-500);
}

/* Branding */
.site-logo {
    max-height: 64px;
    margin-bottom: 1rem;
}

/* Contact card */
.contact-card {
    text-align: center;
    color: var(--gray-700);
}

.contact-card h2 {
    font-size: 1rem;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.contact-card p {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.contact-detail {
    margin-top: 0.5rem;
}

.contact-card a {
    color: var(--primary);
    text-decoration: none;
}

.contact-card a:hover {
    text-decoration: underline;
}

/* Send file drop zone (compact) */
.drop-zone-sm {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    margin-bottom: 0.75rem;
}

.drop-zone-sm:hover,
.drop-zone-sm.drag-over {
    border-color: var(--primary);
    background: #eff6ff;
}

.drop-zone-sm p {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin: 0;
}

.send-file-info {
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    color: var(--gray-700);
}

/* Email preview textarea */
.email-preview {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--gray-50);
    font-family: inherit;
    font-size: 0.875rem;
    line-height: 1.6;
    resize: vertical;
    color: var(--gray-900);
}

/* Download page */
.download-card {
    text-align: center;
}

.file-details {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 1rem;
    margin: 1rem 0;
}

.file-details p {
    margin: 0.25rem 0;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.password-form {
    margin: 1rem 0;
}

.password-form input[type="password"] {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}
