* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    direction: rtl;
}

/* Modal Base */
.modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

#infoModal.active,
#cardModal.active {
    z-index: 1100;
}

/* إظهار المودال عند الحاجة */
.modal.active {
    display: flex !important;
}

/* إظهار المودال عند الحاجة (عن طريق JavaScript) */
.modal.show {
    display: flex !important;
}

.modal-hidden {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Login Modal */
.login-box {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-header {
    margin-bottom: 30px;
}

.login-logo {
    height: 60px;
    margin-bottom: 20px;
    display: block;
}

.login-header h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.login-form-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.password-input {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    direction: rtl;
    transition: border-color 0.3s;
}

.password-input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-login {
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.login-note {
    font-size: 12px;
    color: #666;
    margin-top: 15px;
}

.login-note strong {
    color: #667eea;
}

/* Dashboard */
.dashboard-hidden {
    display: none !important;
}

.dashboard-header {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-logo {
    height: 40px;
}

.header-content h1 {
    font-size: 24px;
    color: #333;
}

.btn-logout {
    padding: 10px 20px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-logout:hover {
    background: #ee5a52;
}

/* Controls */
.dashboard-controls {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.search-box {
    flex: 1;
    min-width: 250px;
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    direction: rtl;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-search {
    padding: 10px 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.btn-search:hover {
    background: #764ba2;
}

.bulk-actions {
    display: flex;
    gap: 10px;
}

/* Buttons */
.btn-danger {
    padding: 10px 15px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-danger:hover {
    background: #ee5a52;
}

.btn-secondary {
    padding: 10px 15px;
    background: #95a3b3;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #7a8494;
}

/* Table */
.dashboard-tables-wrap {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.form-table-section {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.form-table-title {
    font-size: 20px;
    color: #333;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 3px solid #667eea;
}

.form-table-section .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.dashboard-empty-all {
    background: white;
    padding: 24px;
    border-radius: 10px;
    text-align: center;
    color: #555;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.dashboard-subtable-empty {
    text-align: center;
    color: #666;
    padding: 18px 12px;
    font-size: 15px;
}

.detail-field-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

.detail-field-table th,
.detail-field-table td {
    padding: 12px 14px;
    text-align: right;
    border-bottom: 1px solid #e8e8e8;
}

.detail-field-table th {
    width: 200px;
    max-width: 40%;
    font-weight: 600;
    color: #667eea;
    vertical-align: top;
    background: #f8f9ff;
}

.detail-field-table td {
    color: #333;
    word-break: break-word;
}

.table-container {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.users-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
}

.users-table th {
    padding: 15px;
    text-align: right;
    font-weight: 600;
    color: #333;
}

.users-table td {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.users-table tbody tr:hover {
    background: #f5f5f5;
}

.empty-row td {
    text-align: center;
    color: #999;
}

.action-column {
    text-align: center;
}

.btn-info {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
    width: 100%;
    display: block;
}

.btn-info:hover {
    background: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-card {
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
    width: 100%;
    display: block;
}

.btn-card:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-delete {
    padding: 8px 16px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
    width: 100%;
    display: block;
}

.btn-delete:hover {
    background: #ee5a52;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

/* Info Modal */
.info-box {
    width: 100%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #333;
}

.info-box h2 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #333;
}

.user-details {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #667eea;
}

.detail-value {
    color: #333;
    word-break: break-word;
    max-width: 60%;
    text-align: left;
}

/* Navigation Buttons */
.nav-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.nav-btn {
    padding: 10px 15px;
    background: #f0f0f0;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    color: #333;
}

.nav-btn:hover {
    background: #e0e0e0;
}

.nav-btn.active {
    border-color: #28a745;
    background: #d4edda;
    color: #155724;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-actions button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.loading-overlay.show {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    color: white;
    font-size: 16px;
    font-weight: 500;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    left: 20px;
    background: #28a745;
    color: white;
    padding: 15px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    animation: slideInLeft 0.3s ease;
    max-width: 300px;
    display: none;
}

.notification.show {
    display: block;
}

.notification.error {
    background: #ff6b6b;
}

.notification.warning {
    background: #ffd93d;
    color: #333;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* User Details Container */
.user-details-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.page-section {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s;
}

.page-section h3 {
    color: #333;
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 3px solid #667eea;
}

.fields-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.field-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-item label {
    font-weight: 600;
    color: #667eea;
    font-size: 14px;
}

.field-value {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    color: #333;
    border-right: 4px solid #667eea;
    word-break: break-word;
    min-height: 40px;
    display: flex;
    align-items: center;
}

/* Card Box */
.card-box {
    width: 100%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
}

.card-box h2 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #333;
}

.card-display {
    margin: 20px 0;
}

.card-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
}

.credit-card {
    width: 100%;
    max-width: 440px;
    min-height: 280px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 30px;
    color: white;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    font-family: 'Courier New', monospace;
    transition: transform 0.3s;
    direction: ltr;
    text-align: left;
}

.credit-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 80px rgba(102, 126, 234, 0.5);
}

.credit-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: cardShine 3s infinite;
}

@keyframes cardShine {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(20px, 20px) rotate(20deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.card-type {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 3px;
}

.card-chip {
    font-size: 40px;
}

.card-number-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: clamp(4px, 1.8vw, 14px);
    width: 100%;
    margin: 8px 0 20px;
    flex: 1;
    align-items: center;
}

.card-number-group {
    font-size: clamp(0.85rem, 3.4vw, 1.5rem);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-align: center;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    min-width: 0;
}

.card-bottom {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    flex-shrink: 0;
    flex-wrap: nowrap;
}

.card-holder {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 0;
}

.card-meta {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: clamp(16px, 4vw, 40px);
    flex-shrink: 0;
}

.card-expiry,
.card-cvv {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
}

.card-holder .label,
.card-expiry .label,
.card-cvv .label {
    font-size: 12px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-holder .value,
.card-expiry .value,
.card-cvv .value {
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 1px;
}

.card-info {
    width: 100%;
    max-width: 440px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.card-info p {
    margin: 10px 0;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-info strong {
    color: #667eea;
    min-width: 150px;
}

/* تلوين الصفوف التي لديها بطاقة مسجلة */
.user-row-with-card {
    background-color: #d4edda !important;
    color: #155724;
    font-weight: 500;
}

.user-row-with-card:hover {
    background-color: #c3e6cb !important;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        text-align: center;
    }

    .dashboard-controls {
        flex-direction: column;
    }

    .search-box {
        width: 100%;
    }

    .bulk-actions {
        width: 100%;
    }

    .nav-buttons {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 20px;
        max-width: calc(100% - 40px);
    }

    .users-table {
        font-size: 12px;
    }

    .form-table-section {
        padding: 14px;
    }

    .form-table-title {
        font-size: 17px;
    }

    .users-table th,
    .users-table td {
        padding: 10px 8px;
    }

    .fields-box {
        grid-template-columns: 1fr;
    }

    .credit-card {
        max-width: 100%;
        min-height: 240px;
        padding: 20px;
    }

    .card-number-row {
        column-gap: clamp(3px, 1.5vw, 10px);
        margin: 6px 0 14px;
    }

    .card-number-group {
        font-size: clamp(0.75rem, 3.2vw, 1.15rem);
        letter-spacing: 0.04em;
    }

    .card-bottom {
        gap: 10px;
    }

    .card-meta {
        gap: 14px;
    }

    .card-holder .value,
    .card-expiry .value,
    .card-cvv .value {
        font-size: 14px;
    }

    .card-info {
        max-width: 100%;
    }

    .card-info p {
        flex-direction: column;
        align-items: flex-start;
    }

    .dash-cards-track {
        padding-bottom: 12px;
    }

    .dash-flip-scene {
        max-width: 100%;
    }

    .dash-mini-num {
        font-size: 11px;
    }
}

/* —— بطاقات قابلة للقلب في مودال الداشبورد —— */
.dash-cards-wrap {
    width: 100%;
    text-align: center;
}

.dash-cards-heading {
    margin: 0 0 8px;
    font-size: 1.15rem;
    color: #1f3a6e;
}

.dash-cards-sub {
    margin: 0 0 16px;
    font-size: 0.88rem;
    color: #555;
    line-height: 1.45;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.dash-cards-empty {
    text-align: center;
    color: #666;
    padding: 24px;
}

.dash-otp-section {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(31, 58, 110, 0.15);
    text-align: right;
}

.dash-otp-heading {
    margin: 0 0 12px;
    font-size: 1.05rem;
    color: #1f3a6e;
}

.dash-otp-empty {
    color: #666;
    font-size: 0.9rem;
}

.dash-otp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: #f8fafc;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 8px rgba(31, 58, 110, 0.08);
}

.dash-otp-table th,
.dash-otp-table td {
    padding: 10px 12px;
    text-align: right;
    border-bottom: 1px solid #e2e8f0;
}

.dash-otp-table thead th {
    background: #e8eef7;
    color: #1f3a6e;
    font-weight: 600;
}

.dash-otp-table tbody tr:last-child td {
    border-bottom: none;
}

.dash-otp-code {
    display: inline-block;
    padding: 2px 8px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    font-size: 0.95em;
    direction: ltr;
    unicode-bidi: isolate;
}

.dash-cards-track {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 18px;
    overflow-x: auto;
    overflow-y: visible;
    padding: 12px 8px 20px;
    justify-content: flex-start;
    align-items: flex-start;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}

.dash-flip-card-3d {
    flex: 0 0 auto;
    scroll-snap-align: start;
    width: min(220px, 78vw);
    text-align: center;
}

.dash-flip-scene {
    perspective: 1100px;
    width: 100%;
    max-width: 220px;
    margin: 0 auto;
}

.dash-flip-inner {
    position: relative;
    width: 100%;
    min-height: 138px;
    transform-style: preserve-3d;
    transition: transform 0.65s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.dash-flip-card-3d.is-flipped .dash-flip-inner {
    transform: rotateY(180deg);
}

.dash-flip-face {
    position: absolute;
    inset: 0;
    border-radius: 14px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    box-shadow: 0 10px 28px rgba(31, 58, 110, 0.35);
    overflow: hidden;
}

.dash-flip-front {
    background: linear-gradient(155deg, #1a3564 0%, #1f62ae 42%, #2563b8 100%);
    color: #fff;
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    direction: ltr;
    font-size: 10px;
}

.dash-mini-brand {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    opacity: 0.95;
}

.dash-mini-chip {
    width: 32px;
    height: 24px;
    margin-top: 4px;
    border-radius: 5px;
    background: linear-gradient(135deg, #e6c06b, #b8923f);
}

.dash-mini-num {
    margin-top: 10px;
    font-family: 'Courier New', Consolas, monospace;
    font-size: clamp(11px, 2.8vw, 13px);
    letter-spacing: 0.05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    direction: ltr;
    unicode-bidi: plaintext;
    text-align: left;
}

.dash-mini-bottom {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
    padding-top: 8px;
    gap: 8px;
    direction: ltr;
}

.dash-mini-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 9px;
}

.dash-mini-col--meta {
    align-items: flex-end;
    flex-shrink: 0;
}

.dash-mini-name {
    font-size: 9px;
    opacity: 0.92;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-mini-kv {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: baseline;
    justify-content: flex-end;
    gap: 6px;
    direction: ltr;
    unicode-bidi: isolate;
}

.dash-mini-k {
    font-size: 8px;
    opacity: 0.78;
    flex-shrink: 0;
}

.dash-mini-exp {
    font-size: 10px;
    font-weight: 600;
}

.dash-mini-cvv {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    min-width: 2.2em;
    text-align: left;
}

.dash-flip-back {
    background: linear-gradient(205deg, #2d4a7c 0%, #1f62ae 50%, #163358 100%);
    transform: rotateY(180deg);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dash-back-shine {
    position: absolute;
    inset: -40%;
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255, 255, 255, 0.12) 50%,
        transparent 60%
    );
    animation: dashCardShine 2.8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes dashCardShine {
    0% {
        transform: translateX(-30%) rotate(0deg);
    }
    100% {
        transform: translateX(30%) rotate(0deg);
    }
}

.dash-back-body {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 16px;
}

.dash-back-title {
    display: block;
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.dash-back-balance {
    display: block;
    font-size: clamp(1.1rem, 4vw, 1.45rem);
    font-weight: 800;
    animation: dashBalancePop 0.55s ease-out both;
}

.dash-flip-card-3d.is-flipped .dash-back-balance {
    animation: dashBalancePulse 1.8s ease-in-out infinite 0.2s;
}

@keyframes dashBalancePop {
    from {
        transform: scale(0.86);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes dashBalancePulse {
    0%,
    100% {
        transform: scale(1);
        text-shadow: 0 0 0 transparent;
    }
    50% {
        transform: scale(1.06);
        text-shadow: 0 0 18px rgba(255, 255, 255, 0.45);
    }
}

.btn-flip-card {
    margin-top: 10px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-flip-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.45);
}

.dash-flip-caption {
    margin: 8px 0 0;
    font-size: 14px;
    font-weight: 700;
    color: #1f62ae;
}
