/* --- Variables & Reset --- */
:root {
    --srm-primary: #2271b1;
    --srm-secondary: #f0f0f1;
    --srm-text: #3c434a;
    --srm-border: #c3c4c7;
    --srm-green: #00a32a;
    --srm-red: #d63638;
    --srm-orange: #dba617;
    --srm-radius: 8px;
    --srm-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.srm-wrapper {
    max-width: 600px; /* Mobile-focused width */
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--srm-text);
}

/* --- Counters Section --- */
.srm-counters-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.srm-counter-box {
    background: #fff;
    border: 1px solid var(--srm-border);
    border-radius: var(--srm-radius);
    padding: 15px;
    text-align: center;
    box-shadow: var(--srm-shadow);
}

.srm-counter-box .srm-label {
    display: block;
    font-size: 0.85rem;
    color: #646970;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.srm-counter-box .srm-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
}

.srm-counter-box .srm-sub-text {
    font-size: 0.75rem;
    color: #a7aaad;
}

/* --- Search Section --- */
.srm-search-section {
    margin-bottom: 20px;
}

#srm-search-form {
    display: flex;
    gap: 10px;
}

#srm-search-input {
    flex-grow: 1;
    padding: 12px;
    border: 1px solid var(--srm-border);
    border-radius: var(--srm-radius);
    font-size: 1rem;
}

/* --- Student Card UI --- */
.srm-card {
    background: #fff;
    border: 1px solid var(--srm-border);
    border-radius: var(--srm-radius);
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.srm-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.srm-user-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.25rem;
    font-weight: 600;
}

/* Badges */
.srm-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.srm-badge-blue { background: #e5f5fa; color: #0073aa; }
.srm-badge-green { background: #edfaef; color: var(--srm-green); border: 1px solid #c5ebd0; }
.srm-badge-red { background: #fbeaea; color: var(--srm-red); border: 1px solid #ebcdce; }
.srm-badge-orange { background: #fcf9e8; color: var(--srm-orange); border: 1px solid #f0e6ab; }
.srm-badge-gray { background: #f0f0f1; color: #646970; }

.srm-expiry-status {
    font-size: 0.8rem;
    text-align: right;
    padding: 6px 10px;
    border-radius: 20px;
    font-weight: 500;
}

.srm-divider {
    border: 0;
    height: 1px;
    background: #f0f0f1;
    margin: 15px 0;
}

/* Details Grid */
.srm-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 480px) {
    .srm-details-grid {
        grid-template-columns: 1fr; /* Single column on small mobile */
    }
}

.srm-field-group label {
    display: block;
    font-size: 0.75rem;
    color: #646970;
    margin-bottom: 2px;
}

.srm-value-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.srm-copy-icon {
    color: #a7aaad;
    cursor: pointer;
    font-size: 16px;
    transition: color 0.2s;
}

.srm-copy-icon:hover {
    color: var(--srm-primary);
}

/* Resource Box (VPS/MT4) */
.srm-full-width {
    grid-column: 1 / -1;
}

.srm-resource-box {
    background: #f6f7f7;
    border-left: 4px solid var(--srm-primary);
    padding: 15px;
    margin-top: 10px;
    border-radius: 0 4px 4px 0;
}

.srm-resource-box h4 {
    margin: 0 0 10px 0;
    font-size: 0.95rem;
    color: #1d2327;
}

.srm-resource-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.srm-sub-field label {
    font-weight: 600;
    font-size: 0.8rem;
    margin-right: 5px;
}

.srm-mono {
    font-family: monospace;
    background: #fff;
    padding: 2px 4px;
    border-radius: 3px;
    border: 1px solid #dcdcde;
}

.srm-blur {
    filter: blur(3px);
    cursor: pointer;
    transition: filter 0.2s;
}
.srm-blur:hover {
    filter: none;
}

/* --- Action Bar & Buttons --- */
.srm-action-bar {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.srm-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.srm-btn-primary { background: var(--srm-primary); color: #fff; }
.srm-btn-primary:hover { background: #135e96; }

.srm-btn-secondary { background: #fff; border: 1px solid var(--srm-primary); color: var(--srm-primary); }
.srm-btn-secondary:hover { background: #f0f6fc; }

.srm-btn-green { background: var(--srm-green); color: white; }
.srm-btn-green:hover { background: #008a20; }

.srm-btn-neutral { background: #f0f0f1; color: #1d2327; border: 1px solid #dcdcde; }
.srm-btn-neutral:hover { background: #e0e0e0; }

.srm-btn.processing {
    opacity: 0.7;
    cursor: wait;
}

/* --- Utilities --- */
.srm-text-green { color: var(--srm-green); }
.srm-text-red { color: var(--srm-red); }

.animate-fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

.srm-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--srm-primary);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

.srm-spinner-small {
    border: 2px solid #f3f3f3;
    border-top: 2px solid white;
    border-radius: 50%;
    width: 12px;
    height: 12px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Payment History List --- */
.srm-payment-card {
    border: 1px solid #e2e4e7;
    border-left: 3px solid #ccc;
    padding: 10px;
    margin-bottom: 8px;
    background: #fff;
    font-size: 0.9rem;
}

.srm-pay-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-weight: 600;
}
.srm-pay-status.text-green { color: var(--srm-green); }
.srm-pay-status.text-red { color: var(--srm-red); }