/* =====================================================
   GLOBAL RESET & BASE STYLES
   ===================================================== */
* {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

body {
    background: #f0f2f5;
    margin: 0;
    padding: 40px;
    color: #1f2937;
}

h2 {
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
    color: #1f2937;
}

label {
    display: block;
    margin-top: 14px;
    margin-bottom: 6px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    transition: border-color 0.2s;
}

input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

button {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

button:disabled {
    background: #e5e7eb;
    color: #4b5563;
    cursor: not-allowed;
}

button:not(:disabled) {
    background: #2563eb;
    color: #ffffff;
}

button:not(:disabled):hover {
    background: #1d4ed8;
}

button:not(:disabled):active {
    transform: scale(0.98);
}

.error {
    font-size: 12px;
    color: #dc2626;
    margin-top: 4px;
}

.error-message {
    color: #dc2626;
    font-size: 14px;
    margin-top: 12px;
    text-align: center;
}

.required {
    color: #dc2626;
    font-weight: bold;
    margin-left: 4px;
}

/* =====================================================
   RECHARGE PAGE (index.html)
   ===================================================== */
.container {
    max-width: 400px;
    margin: 40px auto;
    background: #ffffff;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.status {
    margin-top: 20px;
    padding: 12px;
    border-radius: 6px;
    background: #ecfdf5;
    color: #065f46;
    font-size: 14px;
    display: none;
}

.status.show {
    display: block;
}

/* Profile Modal (index.html) */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.modal-content {
    background: white;
    width: 400px;
    margin: 10% auto;
    padding: 28px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.modal-content input {
    width: 100%;
    margin-bottom: 10px;
    padding: 10px;
}

.modal-content button {
    width: 100%;
    padding: 10px;
    background: #4f46e5;
    color: white;
    border: none;
    cursor: pointer;
}

/* =====================================================
   LOGIN PAGE
   ===================================================== */
.login-body {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    padding: 40px 36px;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
}

.login-container h2 {
    color: #1e3a5f;
    font-size: 24px;
    margin-bottom: 4px;
}

.login-subtitle {
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    margin-top: 0;
    margin-bottom: 28px;
}

.login-container .input-group {
    margin-bottom: 18px;
}

.login-container label {
    margin-top: 0;
    margin-bottom: 6px;
}

.field-hint {
    display: block;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}

.login-btn {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.2s;
}

.login-btn:hover {
    background: #1d4ed8;
}

.login-btn:disabled {
    background: #93c5fd;
    cursor: not-allowed;
}

/* =====================================================
   ADMIN DASHBOARD
   ===================================================== */
.admin-body {
    background: #f0f2f5;
    padding: 0;
    min-height: 100vh;
}

.admin-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    color: #ffffff;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.admin-header h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.logout-btn {
    background: rgba(0, 0, 0, 0.4);
    color: #ffffff;
    padding: 8px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.admin-content {
    max-width: 1100px;
    margin: 32px auto;
    padding: 0 24px;
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.table-header h2 {
    text-align: left;
    font-size: 20px;
    margin: 0;
}

.record-count {
    background: #e0e7ff;
    color: #3730a3;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.table-wrapper {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background: #f8fafc;
}

.admin-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    border-bottom: 2px solid #e5e7eb;
}

.admin-table td {
    padding: 12px 16px;
    font-size: 14px;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
}

.admin-table tbody tr:hover {
    background: #f8fafc;
}

.action-cell {
    white-space: nowrap;
}

.btn-edit,
.btn-delete {
    width: auto;
    display: inline-block;
    padding: 6px 14px;
    margin: 2px 4px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-edit {
    background: #dbeafe;
    color: #1d4ed8;
}

.btn-edit:hover {
    background: #bfdbfe;
}

.btn-delete {
    background: #fee2e2;
    color: #7f1d1d;
}

.btn-delete:hover {
    background: #fecaca;
}

/* =====================================================
   ADMIN EDIT MODAL
   ===================================================== */
.admin-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.admin-modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 440px;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
}

.admin-modal-content h3 {
    margin: 0 0 20px;
    font-size: 20px;
    color: #1f2937;
}

.admin-modal-content .input-group {
    margin-bottom: 14px;
}

.admin-modal-content label {
    margin-top: 0;
    margin-bottom: 6px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-save,
.btn-cancel {
    flex: 1;
    padding: 10px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 0;
    transition: background 0.2s;
}

.btn-save {
    background: #2563eb;
    color: #ffffff;
}

.btn-save:hover {
    background: #1d4ed8;
}

.btn-cancel {
    background: #f3f4f6;
    color: #374151;
}

.btn-cancel:hover {
    background: #e5e7eb;
}