/* Temp Mail CSS - refactored from inline style */

.tm-layout {
    align-items: stretch;
    width: 100%;
    margin-left: -5px;
    margin-right: -5px;
}

.tm-layout > .tm-sidebar-wrap,
.tm-layout > .tm-inbox-wrap,
.tm-layout > .tm-wallet-wrap {
    padding-left: 5px;
    padding-right: 0 !important;
    
}

.tm-sidebar,
.tm-inbox {
    width: 100%;
    max-width: 100%;
}


.tm-sidebar {
    padding-top: 8px;
    padding-bottom: 8px;
    padding-right: 13px;
}

.tm-inbox {
    overflow-x: auto;
    min-height: calc(100vh - 180px);
}

.tm-wallet-wrap .account-card {
    height: auto;
    margin-right: -4px;
    margin-left: 18px;
}

@media (max-width: 991px) {
    .tm-sidebar,
    .tm-inbox,
    .tm-wallet-wrap .account-card {
        height: auto;
    }

    .tm-sidebar {
        padding-right: 0;
    }

    .tm-wallet-wrap .account-card {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

@media (max-width: 575px) {
    .tm-layout {
        margin-left: 0;
        margin-right: 0;
    }

    .tm-sidebar-wrap,
    .tm-inbox-wrap,
    .tm-wallet-wrap {
        padding-left: 8px;
        padding-right: 8px;
    }
}

.tm-top-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid #e5e7eb;
    border-radius: 7px;
    overflow: hidden;
    background: #fff;
    margin-bottom: 14px;
}

.tm-top-actions button {
    height: 45px;
    border: none;
    background: #fff;
    font-weight: 600;
    color: #1f2937;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.tm-top-actions .btn-create {
    background: #07855c;
    color: #fff;
}

.tm-top-actions button:hover {
    opacity: 0.92;
}

.tm-limit {
    text-align: center;
    color: #64748b;
    font-size: 13px;
    margin: 10px 0 12px;
}

.tm-email-card {
    background: #fff;
    border: 1.5px solid #4f46e5;
    border-radius: 7px;
    overflow: hidden;
    margin-bottom: 10px;
    cursor: pointer;
    transition: box-shadow 0.15s;
}

.tm-email-card:hover {
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.12);
}

.tm-email-card.active {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.tm-card-main {
    padding: 14px 12px 10px;
}

.tm-card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.tm-card-address {
    font-weight: 700;
    font-size: 15px;
    word-break: break-all;
    color: #0f172a;
}

.tm-badge {
    background: #eef2ff;
    color: #4338ca;
    border-radius: 7px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    white-space: nowrap;
}

.tm-card-meta {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #64748b;
    font-size: 12px;
}

.tm-card-meta .red {
    color: #dc2626;
    font-weight: 600;
}

.tm-card-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid #e5e7eb;
}

.tm-card-actions button {
    height: 36px;
    border: none;
    border-right: 1px solid #e5e7eb;
    background: #fff;
    color: #334155;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.tm-card-actions button:last-child {
    border-right: none;
}

.tm-card-actions button:hover {
    background: #f8fafc;
}

.tm-inbox {
    flex: 1;
    background: #f8fafc;
    border-radius: 7px;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.tm-inbox-header {
    height: 66px;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 18px 8px 12px;
    border-radius: 7px 7px 0 0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    flex-wrap: wrap;
    gap: 8px;
}

.tm-selected-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.tm-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: #475569;
    flex-shrink: 0;
    font-size: 18px;
    border: 1px solid #e2e8f0;
}

.tm-status-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 12px;
}

.tm-online {
    background: #bbf7d0;
    color: #047857;
    padding: 2px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 11px;
}

.tm-selected-address {
    font-size: 14px;
    font-weight: 700;
    word-break: break-all;
    color: #0f172a;
}

.tm-header-actions {
    display: flex;
    gap: 10px;
}

.tm-header-actions button {
    width: 40px;
    height: 40px;
    border: none;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    color: #1f2937;
    display: grid;
    place-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.tm-header-actions button:hover {
    background: #f1f5f9;
}

.tm-inbox-body {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
}

.tm-message-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tm-message-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.tm-message-item:hover {
    border-color: #6366f1;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
}

.tm-msg-from {
    font-weight: 700;
    font-size: 15px;
    color: #0f172a;
    margin-bottom: 3px;
}

.tm-msg-subject {
    font-size: 14px;
    color: #475569;
}

.tm-msg-time {
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
    flex-shrink: 0;
}

.tm-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #94a3b8;
    font-size: 15px;
    text-align: center;
    min-height: 300px;
}

.tm-empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #cbd5e1;
}

/* CREATE MODAL */
.tm-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    z-index: 1055;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s;
}

.tm-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.tm-create-modal {
    width: 640px;
    max-width: 100%;
    background: #fff;
    border-radius: 11px;
    padding: 20px 18px 16px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
    transform: translateY(12px);
    transition: transform 0.25s;
    max-height: 92vh;
    overflow-y: auto;
}

.tm-modal-overlay.open .tm-create-modal {
    transform: translateY(0);
}

.tm-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.tm-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}

.tm-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #4b5563;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    font-weight: 300;
    display: grid;
    place-items: center;
}

.tm-field {
    margin-bottom: 16px;
}

.tm-field-label {
    display: block;
    margin-bottom: 7px;
    color: #374151;
    font-size: 13px;
    font-weight: 700;
}

.tm-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 7px;
}

.tm-label-row label {
    color: #374151;
    font-size: 13px;
    font-weight: 700;
}

.tm-clear-btn {
    border: none;
    background: transparent;
    color: #4f46e5;
    font-size: 13px;
    cursor: pointer;
    font-weight: 500;
}

.tm-field input,
.tm-field select {
    width: 100%;
    height: 42px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    padding: 0 14px;
    color: #4b5563;
    font-size: 15px;
    background: #fff;
    outline: none;
}

.tm-field select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
    background-position: calc(100% - 18px) 16px, calc(100% - 13px) 16px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 34px;
}

.tm-option-grid {
    display: grid;
    gap: 8px;
}

.tm-option-grid.col3 {
    grid-template-columns: repeat(3, 1fr);
}

.tm-option-grid.col2 {
    grid-template-columns: repeat(2, 1fr);
}

.tm-option-btn {
    min-height: 64px;
    border: 2px solid #e5e7eb;
    border-radius: 7px;
    background: #fff;
    color: #4b5563;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    padding: 8px;
    transition: all 0.15s;
}

.tm-option-btn strong {
    font-size: 14px;
    font-weight: 700;
}

.tm-option-btn .tag {
    font-size: 11px;
    font-weight: 500;
}

.tm-option-btn .tag.premium {
    color: #f59e0b;
}

.tm-option-btn .tag.free {
    color: #10b981;
}

.tm-option-btn.active {
    border-color: #6366f1;
    background: #f8fafc;
    color: #3730a3;
}

.tm-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
}

.tm-modal-footer .btn-cancel {
    padding: 9px 20px;
    border: none;
    border-radius: 7px;
    background: #e5e7eb;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.tm-title-box {
    text-align: center;
    margin-bottom: 24px;
}

.tm-title-box h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 6px;
    color: #0f172a;
}

.tm-title-box p {
    font-size: 16px;
    color: #64748b;
    margin: 0;
}

.tm-modal-footer .btn-generate {
    padding: 9px 22px;
    border: none;
    border-radius: 7px;
    background: #6366f1;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.tm-modal-footer .btn-generate:hover {
    background: #4f46e5;
}

@media (max-width: 768px) {
    .tm-inbox-header {
        height: auto;
        padding: 10px 12px;
    }
    .tm-create-modal {
        width: 100%;
        border-radius: 0;
        max-height: 100vh;
    }
    .tm-option-grid.col3,
    .tm-option-grid.col2 {
        grid-template-columns: repeat(2, 1fr);
    }
}
