/* e-Imarah Mobile App & QR Reporting Styles */

.eim-app-wrapper {
    max-width: 480px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1f2937;
    background-color: #f3f4f6;
    min-height: 100vh;
    padding-bottom: 40px;
    box-shadow: 0 0 25px rgba(0,0,0,0.06);
    border-radius: 16px;
    overflow: hidden;
}

/* Header */
.eim-header {
    background: linear-gradient(135deg, #065f46 0%, #047857 100%);
    color: #ffffff;
    padding: 24px 20px 20px;
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
}

.eim-title-row {
    margin-bottom: 16px;
}

.eim-badge-header {
    background: rgba(255,255,255,0.2);
    color: #ecfdf5;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 12px;
    display: inline-block;
    margin-bottom: 6px;
}

.eim-title-row h2 {
    color: #ffffff !important;
    margin: 4px 0 2px !important;
    font-size: 20px !important;
    font-weight: 700;
}

.eim-title-row small {
    color: #a7f3d0;
    font-size: 12px;
}

/* Overview Card */
.eim-overview-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 16px;
    padding: 16px;
}

.eim-ov-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.eim-ov-label {
    display: block;
    font-size: 11px;
    color: #d1fae5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.eim-ov-amount {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* Tabs Navigation */
.eim-tabs-nav {
    display: flex;
    background: #ffffff;
    margin: 16px;
    padding: 6px;
    border-radius: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.eim-tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 10px 2px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.eim-tab-btn.active {
    background: #047857;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(4, 120, 87, 0.25);
}

.eim-tab-btn .eim-icon {
    font-size: 16px;
}

/* Content & Cards */
.eim-tab-content {
    padding: 0 16px;
}

.eim-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.eim-card-header h3 {
    font-size: 17px;
    margin: 0 0 4px !important;
    font-weight: 700;
    color: #111827;
}

.eim-card-header p {
    font-size: 12px;
    color: #6b7280;
    margin: 0 0 16px !important;
}

/* Forms */
.eim-form-group {
    margin-bottom: 16px;
}

.eim-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.eim-form-group input[type="text"],
.eim-form-group input[type="tel"],
.eim-form-group input[type="url"],
.eim-form-group input[type="number"],
.eim-form-group input[type="date"],
.eim-form-group select,
.eim-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 15px;
    box-sizing: border-box;
    background-color: #f9fafb;
}

.eim-form-group input:focus,
.eim-form-group select:focus,
.eim-form-group textarea:focus {
    outline: none;
    border-color: #047857;
    background-color: #ffffff;
}

.eim-input-lg {
    font-size: 22px !important;
    font-weight: 700;
    color: #065f46;
}

/* Camera Box */
.eim-camera-box {
    border: 2px dashed #10b981;
    background: #ecfdf5;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
}

.eim-camera-box:hover {
    background: #d1fae5;
}

.eim-cam-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 4px;
}

.eim-camera-box strong {
    display: block;
    font-size: 14px;
    color: #065f46;
}

.eim-camera-box small {
    font-size: 12px;
    color: #047857;
}

/* Buttons */
.eim-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.eim-btn-danger {
    background: #dc2626;
    color: #ffffff;
}
.eim-btn-danger:hover { background: #b91c1c; }

.eim-btn-success {
    background: #047857;
    color: #ffffff;
}
.eim-btn-success:hover { background: #065f46; }

/* Cash Breakdown Calculator */
.eim-calc-accordion {
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.eim-calc-toggle {
    padding: 12px 14px;
    background: #f9fafb;
    font-size: 13px;
    font-weight: 600;
    color: #047857;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.eim-calc-body {
    padding: 14px;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
}

.eim-denom-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.eim-denom-item label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #4b5563;
    margin-bottom: 2px;
}

.eim-denom-item input {
    width: 100%;
    padding: 8px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-sizing: border-box;
}

.eim-denom-item.full-width {
    grid-column: span 3;
    margin-top: 4px;
}

/* List Items */
.eim-recent-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.eim-trx-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f9fafb;
    border-left: 4px solid #9ca3af;
}

.eim-trx-left strong {
    display: block;
    font-size: 14px;
    color: #111827;
}

.eim-trx-left small {
    display: block;
    font-size: 12px;
    color: #6b7280;
}

.eim-trx-right {
    text-align: right;
}

/* Badges */
.eim-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.eim-badge.new { background: #fee2e2; color: #dc2626; }
.eim-badge.in_progress { background: #fef3c7; color: #d97706; }
.eim-badge.resolved { background: #d1fae5; color: #047857; }
.eim-badge.active { background: #d1fae5; color: #047857; }
.eim-badge.maintenance { background: #fee2e2; color: #dc2626; }

/* Alerts */
.eim-alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.eim-alert-success { background: #d1fae5; color: #065f46; }
.eim-alert-error { background: #fee2e2; color: #991b1b; }

/* Footer */
.eim-footer {
    text-align: center;
    margin-top: 24px;
    color: #9ca3af;
    font-size: 12px;
}

/* Unified Portal Extra Styles */
.eim-logout-link {
    background: rgba(255,255,255,0.2);
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    transition: background 0.2s;
}
.eim-logout-link:hover {
    background: rgba(255,255,255,0.35);
}

.eim-summary-mini-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.eim-mini-stat {
    background: #f9fafb;
    padding: 10px 12px;
    border-radius: 10px;
}

.eim-mini-stat small {
    display: block;
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 2px;
}

.eim-mini-stat strong {
    font-size: 15px;
    color: #111827;
}

/* Modal Popup in Mobile */
.eim-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    padding: 16px;
}

.eim-modal-content {
    background: #ffffff;
    border-radius: 16px;
    padding: 22px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    max-height: 90vh;
    overflow-y: auto;
}

/* =====================================================
   ANTARA MUKA MODEN PENGIRA WANG TABUNG (MOBILE-FIRST)
   ===================================================== */
.eim-tabung-mobile-app {
    max-width: 480px;
    margin: 0 auto;
    box-sizing: border-box;
}

.eim-tabung-mobile-app * {
    box-sizing: border-box;
}

.eim-tabung-mobile-app input[type="text"],
.eim-tabung-mobile-app input[type="number"],
.eim-tabung-mobile-app input[type="date"] {
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    font-family: inherit;
}

.eim-tabung-mobile-app input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.eim-tabung-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.eim-tabung-jum-card {
    border: 2px solid #10b981;
}

.eim-tabung-am-card {
    border: 2px solid #3b82f6;
}

.eim-amount-box-large {
    background: #ffffff;
    border-radius: 12px;
    padding: 10px 16px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
