:root {
    --t2u-purple: #ad57a1;
    --t2u-purple-dark: #8e3f84;
    --t2u-navy: #0b486b;
    --t2u-gray-bg: #f5f6f8;
    --t2u-gray-border: #e0e0e0;
    --t2u-gray-text: #666666;
    --t2u-dark-text: #333333;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--t2u-gray-bg);
    color: var(--t2u-dark-text);
    line-height: 1.5;
    padding: 20px 10px 40px;
}

.t2u-container {
    max-width: 800px;
    margin: 0 auto;
}

.t2u-banner-wrapper {
    text-align: center;
    margin-bottom: 20px;
}

.t2u-banner {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.t2u-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    overflow: hidden;
    margin-bottom: 25px;
}

.t2u-card-header {
    padding: 24px 28px 16px;
    border-bottom: 2px solid var(--t2u-navy);
}

.t2u-card-header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--t2u-navy);
    line-height: 1.35;
}

.t2u-card-body {
    padding: 28px;
}

.t2u-form-group {
    margin-bottom: 22px;
}

.t2u-label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: #222;
}

.t2u-label .required {
    color: #e53935;
    margin-left: 3px;
}

.t2u-input, .t2u-select, .t2u-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--t2u-gray-border);
    border-radius: 4px;
    font-size: 0.95rem;
    color: #333;
    transition: border-color 0.2s ease;
}

.t2u-input:focus, .t2u-select:focus, .t2u-textarea:focus {
    outline: none;
    border-color: var(--t2u-purple);
    box-shadow: 0 0 0 2px rgba(173, 87, 161, 0.15);
}

.t2u-hint {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-top: 4px;
}

.t2u-radio-group, .t2u-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--t2u-gray-border);
    border-radius: 4px;
    background-color: #fafafa;
}

.t2u-radio-row, .t2u-checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 0.92rem;
}

.t2u-radio-row input, .t2u-checkbox-row input {
    margin-top: 4px;
    cursor: pointer;
    accent-color: var(--t2u-purple);
}

.t2u-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
    max-height: 280px;
    overflow-y: auto;
    padding: 12px;
    border: 1px solid var(--t2u-gray-border);
    border-radius: 4px;
    background: #fafafa;
}

.t2u-btn-submit {
    display: inline-block;
    width: 100%;
    padding: 14px 20px;
    background-color: var(--t2u-purple);
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.t2u-btn-submit:hover {
    background-color: var(--t2u-purple-dark);
}

.t2u-btn-submit:active {
    transform: scale(0.99);
}

.t2u-btn-secondary {
    display: inline-block;
    padding: 10px 18px;
    background-color: #f0f0f0;
    color: #333;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid #ccc;
    text-decoration: none;
    cursor: pointer;
}

.t2u-btn-secondary:hover {
    background-color: #e4e4e4;
}

.t2u-tnc-box {
    background-color: #f9f9f9;
    padding: 18px;
    border-radius: 6px;
    border: 1px solid #eee;
    font-size: 0.85rem;
    color: #555;
    line-height: 1.6;
    margin-top: 25px;
}

.t2u-tnc-box h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 8px;
}

.t2u-confirmation-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background-color: #e8f5e9;
    color: #2e7d32;
    border-radius: 50%;
    font-size: 32px;
    margin-bottom: 16px;
}

.t2u-qr-box {
    text-align: center;
    padding: 20px;
    background: #ffffff;
    border: 2px dashed var(--t2u-purple);
    border-radius: 8px;
    margin: 20px 0;
}

.t2u-qr-image {
    max-width: 220px;
    height: auto;
    display: block;
    margin: 0 auto 12px;
}

.t2u-status-tag {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 12px;
    text-transform: uppercase;
}

.t2u-status-tag.synced {
    background: #e8f5e9;
    color: #2e7d32;
}

.t2u-status-tag.pending {
    background: #fff3e0;
    color: #e65100;
}

.t2u-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.t2u-nav a {
    color: var(--t2u-navy);
    text-decoration: none;
    font-weight: 600;
}

.t2u-nav a:hover {
    text-decoration: underline;
}

/* Email Outbox Button */
.t2u-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ede7f6;
    color: #4527a0 !important;
    border: 1px solid #d1c4e9;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.t2u-nav-btn:hover {
    background: #d1c4e9;
    color: #311b92 !important;
}

.t2u-badge-count {
    background: #ad57a1;
    color: #fff;
    font-size: 0.72rem;
    padding: 1px 6px;
    border-radius: 10px;
}

/* Modal Overlay & Container */
.t2u-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 15, 30, 0.65);
    backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.t2u-modal-overlay.open {
    display: flex;
}

.t2u-modal-dialog {
    background: #ffffff;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-15px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.t2u-modal-header {
    background: #0b486b;
    color: #ffffff;
    padding: 16px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #ad57a1;
}

.t2u-modal-header h2 {
    font-size: 1.25rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.t2u-modal-close {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 4px;
    transition: background 0.15s;
}

.t2u-modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
}

.t2u-modal-toolbar {
    background: #f8f9fa;
    padding: 12px 22px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.t2u-modal-search {
    flex: 1;
    min-width: 200px;
    padding: 8px 14px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 0.88rem;
    outline: none;
}

.t2u-modal-search:focus {
    border-color: #ad57a1;
    box-shadow: 0 0 0 3px rgba(173, 87, 161, 0.15);
}

.t2u-modal-body {
    padding: 18px 22px;
    overflow-y: auto;
    flex: 1;
    background: #f4f6f9;
}

/* Email Outbox Card */
.t2u-email-card {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    margin-bottom: 16px;
    overflow: hidden;
    transition: transform 0.1s ease, border-color 0.1s ease;
}

.t2u-email-card:hover {
    border-color: #cbd5e1;
}

.t2u-email-header {
    background: #fafbfc;
    border-bottom: 1px solid #f1f5f9;
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
}

.t2u-email-to {
    font-weight: 700;
    color: #1e293b;
    font-size: 0.95rem;
}

.t2u-email-subject {
    font-size: 0.9rem;
    color: #475569;
    margin-top: 2px;
    font-weight: 600;
}

.t2u-email-meta {
    font-size: 0.78rem;
    color: #64748b;
    text-align: right;
}

.t2u-email-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    background: #ede7f6;
    color: #4527a0;
    text-transform: uppercase;
}

.t2u-email-content {
    padding: 14px 18px;
}

.t2u-command-box {
    background: #1e1e24;
    color: #00ff66;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.78rem;
    padding: 8px 12px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    gap: 10px;
    overflow-x: auto;
}

.t2u-command-box span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.t2u-email-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
    align-items: center;
}

.t2u-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.15s;
}

.t2u-action-btn.browser {
    background: #198754;
    color: #ffffff;
}

.t2u-action-btn.browser:hover {
    background: #157347;
}

.t2u-action-btn.adb {
    background: #212529;
    color: #00ff66;
    border-color: #374151;
}

.t2u-action-btn.adb:hover {
    background: #111827;
}

.t2u-action-btn.ios {
    background: #212529;
    color: #60a5fa;
    border-color: #374151;
}

.t2u-action-btn.ios:hover {
    background: #111827;
}

.t2u-action-btn.copy {
    background: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1;
}

.t2u-action-btn.copy:hover {
    background: #e2e8f0;
}

.t2u-action-btn.del {
    background: #fff1f2;
    color: #e11d48;
    border-color: #fecdd3;
    margin-left: auto;
}

.t2u-action-btn.del:hover {
    background: #ffe4e6;
}

/* Toast Notice */
.t2u-toast {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: #10b981;
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10000;
    display: none;
    animation: toastSlideUp 0.2s ease-out;
}

@keyframes toastSlideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

