* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f4f6f9;
    color: #1a1a2e;
}
.wrap {
    max-width: 480px;
    margin: 60px auto;
    padding: 0 20px;
}
.wrap.wide { max-width: 900px; }
h1 { text-align: center; margin-bottom: 24px; }
.card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}
label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin: 12px 0 6px;
    color: #555;
}
input[type=url], input[type=text], input[type=password] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    font-size: 14px;
}
button {
    margin-top: 16px;
    width: 100%;
    padding: 11px;
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
button:hover { background: #4338ca; }
.result-card { border-left: 4px solid #22c55e; }
.error-card { border-left: 4px solid #ef4444; }
.error-text { color: #ef4444; font-size: 13px; margin: 8px 0 0; }
.success-text { color: #22c55e; font-size: 13px; margin: 8px 0 0; }
.short-url-box { display: flex; gap: 8px; margin-top: 8px; }
.short-url-box input { flex: 1; }
.short-url-box button { width: auto; margin-top: 0; padding: 10px 16px; }
.admin-link { text-align: center; font-size: 13px; }
.admin-link a { color: #888; text-decoration: none; }

/* Admin dashboard */
.admin-header { display: flex; justify-content: space-between; align-items: center; }
.logout-btn {
    color: #ef4444; text-decoration: none; font-size: 14px; font-weight: 600;
}
.stats-row { display: flex; gap: 16px; margin-bottom: 20px; }
.stat-box {
    flex: 1; background: #fff; border-radius: 12px; padding: 16px;
    text-align: center; box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.stat-box span { display: block; font-size: 26px; font-weight: 700; color: #4f46e5; }
.search-form { display: flex; gap: 8px; margin-bottom: 16px; }
.search-form input { flex: 1; padding: 10px 12px; border: 1px solid #dcdfe6; border-radius: 8px; }
.search-form button { width: auto; margin-top: 0; padding: 10px 18px; }
.url-table {
    width: 100%; border-collapse: collapse; background: #fff;
    border-radius: 12px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.url-table th, .url-table td {
    padding: 10px 14px; text-align: left; border-bottom: 1px solid #eee; font-size: 13px;
}
.url-table th { background: #fafafa; font-weight: 600; color: #555; }
.original-url { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.delete-btn { color: #ef4444; text-decoration: none; font-weight: 600; }
.empty-row { text-align: center; color: #999; padding: 24px; }
