/* -----------------------------------------------------------------------
   Shared
----------------------------------------------------------------------- */
.qrr-public-wrap,
.qrr-dash-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1d2327;
}
.qrr-auth-wrap { max-width: 440px; }
.qrr-public-wrap { max-width: 480px; }

.qrr-pub-field { margin-bottom: 16px; }
.qrr-pub-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
}
.qrr-hint { font-weight: 400; color: #888; font-size: 13px; }

.qrr-pub-field input[type="url"],
.qrr-pub-field input[type="text"],
.qrr-pub-field input[type="password"],
.qrr-pub-field input[type="email"] {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    font-size: 14px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    line-height: 1.4;
    transition: border-color 0.15s;
}
.qrr-pub-field input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

/* Buttons */
.qrr-btn {
    display: inline-block;
    padding: 9px 20px;
    font-size: 14px;
    font-weight: 500;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
    line-height: 1.4;
}
.qrr-btn:hover  { background: #135e96; color: #fff; }
.qrr-btn:active { background: #0a4b78; }
.qrr-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.qrr-btn-sm { padding: 6px 14px; font-size: 13px; }
.qrr-btn-ghost {
    background: transparent;
    color: #2271b1;
    border: 1px solid #2271b1;
}
.qrr-btn-ghost:hover { background: #f0f6fc; color: #135e96; }

/* Messages */
.qrr-msg { padding: 10px 14px; border-radius: 4px; font-size: 14px; line-height: 1.5; margin-top: 12px; }
.qrr-msg-error   { background: #fcebeb; color: #8a1f1f; border: 1px solid #f5c6c6; }
.qrr-msg-success { background: #edfaef; color: #1a5c28; border: 1px solid #b8e6c1; }

/* QR output */
#qrr-pub-output { margin-top: 24px; }
.qrr-qr-block { display: inline-block; text-align: center; padding: 20px 24px 16px; border: 1px solid #ddd; border-radius: 6px; background: #fff; }
.qrr-code-label { margin: 12px 0 4px; font-size: 22px; font-weight: 700; letter-spacing: 0.15em; color: #1d2327; font-family: monospace; }
.qrr-output-actions { margin-top: 14px; }
.qrr-notice { margin-top: 16px; padding: 10px 14px; background: #fffbe6; border: 1px solid #f0d060; border-radius: 4px; font-size: 13px; color: #5c4a00; }

/* Modals */
.qrr-modal {
    position: fixed; inset: 0; background: rgba(0,0,0,0.55);
    z-index: 99999; display: flex; align-items: center; justify-content: center;
}
.qrr-modal-inner {
    background: #fff; border-radius: 6px; padding: 28px 32px 24px;
    width: 100%; max-width: 480px; position: relative;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18); max-height: 90vh; overflow-y: auto;
}
.qrr-modal-inner h3 { margin: 0 0 20px; font-size: 16px; padding-right: 24px; }
.qrr-modal-close { position: absolute; top: 14px; right: 16px; background: none; border: none; font-size: 22px; line-height: 1; cursor: pointer; color: #888; padding: 0; }
.qrr-modal-close:hover { color: #1d2327; }

/* -----------------------------------------------------------------------
   Dashboard
----------------------------------------------------------------------- */
.qrr-dash-wrap { max-width: 900px; }

.qrr-dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.qrr-dash-header h2 { margin: 0; font-size: 20px; }
.qrr-dash-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.qrr-empty { text-align: center; padding: 48px 24px; border: 2px dashed #ddd; border-radius: 8px; color: #888; }
.qrr-empty p { font-size: 15px; margin-bottom: 16px; }

/* Code tabs */
.qrr-code-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; border-bottom: 2px solid #eee; padding-bottom: 0; }
.qrr-tab {
    padding: 8px 16px; font-size: 13px; font-weight: 500; background: none;
    border: 1px solid #ddd; border-bottom: none; border-radius: 4px 4px 0 0;
    cursor: pointer; color: #555; transition: all 0.15s; margin-bottom: -2px;
}
.qrr-tab:hover { background: #f6f7f7; color: #1d2327; }
.qrr-tab.active { background: #fff; border-color: #eee; border-bottom-color: #fff; color: #2271b1; font-weight: 600; z-index: 1; }

/* Code panel */
.qrr-code-panel { background: #fff; border: 1px solid #eee; border-radius: 0 6px 6px 6px; padding: 24px; }

.qrr-panel-header { margin-bottom: 16px; }
.qrr-panel-title { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.qrr-panel-code { font-family: monospace; font-size: 18px; font-weight: 700; letter-spacing: 0.1em; color: #1d2327; background: #f0f0f1; padding: 3px 10px; border-radius: 4px; }
.qrr-panel-label { font-size: 16px; font-weight: 600; color: #555; }
.qrr-short-url { font-size: 13px; color: #2271b1; text-decoration: none; word-break: break-all; }
.qrr-short-url:hover { text-decoration: underline; }

.qrr-icon-btn { background: none; border: none; cursor: pointer; color: #aaa; font-size: 14px; padding: 2px 4px; transition: color 0.15s; }
.qrr-icon-btn:hover { color: #2271b1; }

.qrr-dest-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid #f0f0f0; margin-bottom: 8px; }
.qrr-dest-label { font-size: 13px; color: #888; white-space: nowrap; }
.qrr-dest-row span#qrr-dest-display { font-size: 13px; color: #1d2327; word-break: break-all; flex: 1; }

.qrr-edit-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px; background: #f9f9f9; border-radius: 4px; margin-bottom: 12px; }
.qrr-edit-form input { flex: 1; min-width: 200px; padding: 7px 10px; font-size: 13px; border: 1px solid #c3c4c7; border-radius: 4px; box-sizing: border-box; }
.qrr-edit-form input:focus { outline: none; border-color: #2271b1; }

/* Stats */
.qrr-stats-section { margin-top: 24px; }
.qrr-stats-top { display: flex; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.qrr-stat-card { flex: 1; min-width: 120px; background: #f6f7f7; border-radius: 6px; padding: 16px 20px; text-align: center; }
.qrr-stat-num { display: block; font-size: 28px; font-weight: 700; color: #2271b1; line-height: 1.1; }
.qrr-stat-lbl { display: block; font-size: 12px; color: #888; margin-top: 4px; }

.qrr-period-btns { display: flex; gap: 4px; margin-bottom: 16px; }
.qrr-period-btn { padding: 5px 14px; font-size: 12px; font-weight: 500; background: none; border: 1px solid #ddd; border-radius: 20px; cursor: pointer; color: #555; transition: all 0.15s; }
.qrr-period-btn:hover { border-color: #2271b1; color: #2271b1; }
.qrr-period-btn.active { background: #2271b1; border-color: #2271b1; color: #fff; }

.qrr-chart-wrap { position: relative; height: 240px; }

/* Panel header actions row */
.qrr-panel-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}
