/* ===============================
   Sizas QRShort v3.2 PRO – Bitly Style
   =============================== */

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

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f3f4f6;
    color: #111827;
}

.app-shell {
    max-width: 1100px;
    margin: 40px auto;
    background: #ffffff;
    border-radius: 18px;
    padding: 24px 28px 32px;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 20px;
}

.app-header h1 {
    margin: 0;
    font-size: 1.5rem;
    letter-spacing: -0.03em;
    color: #1f2933;
}

nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

nav a {
    color: #2563eb;
    font-size: 0.9rem;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 999px;
    transition: background 0.15s ease, color 0.15s ease;
}

nav a:hover {
    background: #eff6ff;
}

.user-label {
    font-size: 0.85rem;
    color: #6b7280;
    margin-right: 6px;
}

.card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    padding: 18px 20px 20px;
    margin-bottom: 18px;
}

.card h2,
.card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.05rem;
    color: #111827;
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #4b5563;
    margin-bottom: 4px;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="url"],
input[type="datetime-local"],
input[type="file"] {
    width: 100%;
    padding: 9px 11px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #111827;
    font-size: 0.9rem;
    margin-bottom: 10px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus,
input[type="url"]:focus,
input[type="datetime-local"]:focus,
input[type="file"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
    background: #ffffff;
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    border-radius: 999px;
    border: none;
    background: #2563eb;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

.button.small,
button.small {
    padding: 6px 11px;
    font-size: 0.8rem;
}

button:hover,
.button:hover {
    background: #1d4ed8;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}

button:active,
.button:active {
    transform: translateY(1px);
    box-shadow: none;
}

.flash {
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.flash.success {
    background: #ecfdf3;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.flash.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.table thead {
    background: #f9fafb;
}

.table th,
.table td {
    padding: 8px 8px;
    border-bottom: 1px solid #e5e7eb;
}

.table th {
    text-align: left;
    font-weight: 500;
    color: #6b7280;
    font-size: 0.8rem;
}

.table tbody tr:hover {
    background: #f9fafb;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    background: #eff6ff;
    color: #1d4ed8;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 18px;
}

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

.list li {
    margin-bottom: 4px;
    font-size: 0.85rem;
    color: #374151;
}

.utm-builder {
    border: 1px dashed #d1d5db;
    padding: 10px 10px 6px;
    border-radius: 10px;
    margin: 10px 0 14px;
    background: #f9fafb;
}

.utm-builder legend {
    font-size: 0.78rem;
    color: #6b7280;
    padding: 0 6px;
}

.utm-row {
    display: flex;
    gap: 10px;
    margin-bottom: 6px;
}

.utm-row input {
    flex: 1;
}

body .auth-shell {
    max-width: 420px;
    margin: 60px auto;
}

body .auth-shell .app-header {
    border-bottom: none;
    margin-bottom: 10px;
}

body .auth-shell .app-header h1 {
    font-size: 1.4rem;
}

.text-muted {
    font-size: 0.8rem;
    color: #6b7280;
}

/* QR wrapper */
.qr-wrapper {
    text-align: center;
}

.qr-wrapper img {
    max-width: 260px;
    border-radius: 24px;
    background: #ffffff;
    padding: 14px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.15);
}

.short-url-box {
    margin-top: 16px;
    padding: 10px 12px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    word-break: break-all;
    font-size: 0.85rem;
    color: #111827;
}

@media (max-width: 768px) {
    .app-shell {
        margin: 16px;
        padding: 18px 16px 22px;
    }
    .grid-3 {
        grid-template-columns: 1fr;
    }
    .utm-row {
        flex-direction: column;
    }
}
