* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: white;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Logo Styles */
.main-logo-container {
    text-align: center;
    margin-bottom: 25px;
}

.main-logo {
    max-width: 40px;
    height: auto;
    border-radius: 4px;
}

.title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.title-logo {
    max-width: 40px;
    height: auto;
    border-radius: 4px;
}

.title-container h1 {
    color: #f97316;
    font-size: 22px;
    font-weight: 600;
    margin: 0;
}

/* Login Page Styles - Formal Government Design */
.login-container {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #002757;
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.login-card {
    background: white;
    padding: 70px 60px;
    text-align: center;
    max-width: 520px;
    width: 90%;
    position: relative;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #002757, #003366, #002757);
}


.subtitle {
    color: #495057;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 40px;
    letter-spacing: 0.5px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 50px;
}

.input-field {
    position: relative;
    text-align: left;
    margin-bottom: 8px;
    height: 60px;
}

.input-field input {
    width: 100%;
    height: 100%;
    padding: 25px 20px 8px 20px;
    border: none;
    border-bottom: 2px solid #e9ecef;
    background: rgba(248, 249, 250, 0.5);
    font-size: 16px;
    font-weight: 500;
    color: #002757;
    box-sizing: border-box;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
}

.input-field input:focus {
    outline: none;
    border-bottom-color: #002757;
    background: white;
    box-shadow: 0 -2px 0 #002757;
}

.input-field input:hover {
    border-bottom-color: #adb5bd;
    background: white;
}

.input-field input::placeholder {
    color: #adb5bd;
    font-weight: 400;
    opacity: 0;
}

.input-field input:focus::placeholder,
.input-field input:not(:placeholder-shown)::placeholder {
    opacity: 1;
}

.input-field label {
    position: absolute;
    top: 18px;
    left: 20px;
    font-size: 16px;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s ease;
    pointer-events: none;
    text-transform: none;
    letter-spacing: normal;
}

.input-field input:focus + label,
.input-field input:not(:placeholder-shown) + label {
    top: 8px;
    left: 20px;
    font-size: 11px;
    font-weight: 600;
    color: #002757;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-group button {
    background: linear-gradient(135deg, #002757, #003366);
    color: white;
    border: none;
    padding: 0 40px;
    height: 60px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 39, 87, 0.2);
}

.input-group button:hover {
    background: linear-gradient(135deg, #003366, #002757);
    transform: translateY(-1px);
}

.error-dialog {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    padding: 20px;
    margin-top: 25px;
    text-align: center;
    position: relative;
}

.error-dialog::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #dc3545, #c82333, #dc3545);
}

.error-dialog p {
    color: #721c24;
    margin: 0 0 15px 0;
    font-weight: 500;
    font-size: 14px;
}

.error-dialog button {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.error-dialog button:hover {
    background: linear-gradient(135deg, #c82333, #dc3545);
    transform: translateY(-1px);
}

.hidden {
    display: none;
}

/* Loading Page Styles */
.loading-container {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    max-width: 600px;
    width: 90%;
}

.loading-card h1 {
    color: #002757;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 30px;
}


.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #002757;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

#loadingText {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
}

.status-list {
    text-align: left;
    margin-top: 20px;
}

.status-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    color: #333;
}

.status-icon {
    font-weight: bold;
    width: 50px;
    font-size: 12px;
}

/* Header Bar Styles */
.main-header {
    background: #002757;
    border-bottom: 2px solid #001a33;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 70px;
}

.header-content {
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 70px;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-center {
    flex: 1;
    text-align: center;
}

.header-right {
    display: flex;
    align-items: center;
}

.header-logo {
    width: 50px;
    height: 50px;
    border-radius: 4px;
}

.header-title {
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.header-logout-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.header-logout-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* Scrolling Ticker Styles */
.ticker-container {
    background: linear-gradient(90deg, #002757, #003366);
    overflow: hidden;
    white-space: nowrap;
    padding: 15px 0;
    border-bottom: 3px solid #001a33;
    box-shadow: 0 4px 10px rgba(0, 39, 87, 0.2);
}

.ticker-wrapper {
    display: flex;
    width: 200%;
    animation: ticker 40s linear infinite;
}

.ticker-content {
    display: flex;
    width: 50%;
    align-items: center;
}

.ticker-content span {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    padding: 0 50px;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.ticker-container:hover .ticker-wrapper {
    animation-play-state: paused;
}

/* Home Page Styles */
.home-container {
    min-height: 100vh;
    background: white;
}

.home-card {
    padding: 0 20px;
}

.dashboard-content {
    background: white;
    border-radius: 12px;
    padding: 60px;
    margin: 20px;
    text-align: center;
}

/* Account Balance Section */
.account-balance-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 39, 87, 0.08);
}

.balance-header h3 {
    color: #002757;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    text-align: left;
    border-bottom: 2px solid #002757;
    padding-bottom: 8px;
}

.balance-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.package-info {
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid #002757;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-label {
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
}

.info-value {
    color: #002757;
    font-size: 14px;
    font-weight: 600;
}

.messages-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.stat-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 39, 87, 0.15);
}

.stat-item.total {
    border-top: 3px solid #007bff;
}

.stat-item.remaining {
    border-top: 3px solid #28a745;
}

.stat-item.consumed {
    border-top: 3px solid #dc3545;
}

.stat-label {
    display: block;
    color: #6c757d;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-value {
    display: block;
    color: #002757;
    font-size: 24px;
    font-weight: 700;
}


.welcome-text {
    color: #666;
    font-size: 16px;
}

.button-grid {
    display: flex;
    gap: 30px;
    margin-top: 50px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.primary-button {
    background-color: #002757;
    color: white;
    border: none;
    padding: 20px 40px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
}

.primary-button:hover {
    background-color: #003366;
    transform: translateY(-2px);
}

.version-info {
    margin-top: 40px;
    text-align: center;
}

.version-text {
    color: #002757;
    font-size: 14px;
    font-weight: 500;
    padding: 10px;
    display: block;
}

.logout-button {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    display: flex;
    align-items: center;
}

.logout-button:hover {
    background-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
}

.button-icon {
    width: 100%;
    text-align: center;
}

/* OTP Input Styles */
.otp-inputs-container {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.otp-input-unified {
    width: 100%;
    max-width: 350px;
    height: 60px;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background: rgba(248, 249, 250, 0.8);
    color: #002757;
    transition: all 0.3s ease;
    box-sizing: border-box;
    padding: 0 20px;
    margin: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    letter-spacing: 8px;
}

.otp-input-unified:focus {
    outline: none;
    border-color: #002757;
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 39, 87, 0.15);
    transform: translateY(-2px);
}

.otp-input-unified:hover {
    border-color: #adb5bd;
    background: white;
}

.otp-input-unified::placeholder {
    color: #adb5bd;
    font-size: 16px;
    letter-spacing: normal;
}

/* Account Information Section */
.account-balance-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.balance-header {
    margin-bottom: 20px;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 15px;
}

.balance-header h3 {
    color: #002757;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.balance-content {
    background: white;
    border-radius: 8px;
    padding: 20px;
}

.package-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
}

.info-value {
    color: #002757;
    font-size: 16px;
    font-weight: 600;
}

/* Logout Dialog Styles */
.logout-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.logout-dialog.hidden {
    display: none;
}

.logout-dialog-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.logout-dialog-content h3 {
    color: #002757;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 15px 0;
}

.logout-dialog-content p {
    color: #6c757d;
    font-size: 15px;
    margin: 0 0 25px 0;
}

.logout-dialog-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.logout-confirm-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-confirm-btn:hover {
    background: linear-gradient(135deg, #c82333, #dc3545);
    transform: translateY(-1px);
}

.logout-cancel-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-cancel-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* Interface Sections */
.interface-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
}

.interface-section.hidden {
    display: none;
}

.interface-content {
    background: white;
    border-radius: 12px;
    padding: 40px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.interface-content h2 {
    color: #002757;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 30px 0;
    text-align: center;
    border-bottom: 3px solid #002757;
    padding-bottom: 15px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #002757;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    color: #002757;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #002757;
    box-shadow: 0 0 0 3px rgba(0, 39, 87, 0.1);
}

.file-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #002757;
}

.file-info p {
    color: #495057;
    font-size: 14px;
    margin: 5px 0;
}

.file-info span {
    color: #002757;
    font-weight: 700;
}

.action-button {
    background: linear-gradient(135deg, #002757, #003366);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.action-button:hover {
    background: linear-gradient(135deg, #003366, #002757);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 39, 87, 0.3);
}

.cancel-button {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-button:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.table-container {
    margin: 20px 0;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.data-table thead {
    background: linear-gradient(135deg, #002757, #003366);
}

.data-table th {
    color: white;
    font-size: 14px;
    font-weight: 600;
    padding: 15px;
    text-align: left;
}

.data-table td {
    color: #495057;
    font-size: 14px;
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.download-button {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.download-button:hover {
    background: #218838;
    transform: translateY(-1px);
}

.delete-button {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 5px;
}

.delete-button:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* Progress Dialog */
.progress-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.progress-dialog.hidden {
    display: none;
}

.progress-content {
    background: white;
    border-radius: 12px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.progress-content h3 {
    color: #002757;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 25px 0;
}

.progress-bar-container {
    width: 100%;
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #002757, #003366);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-bar span {
    color: white;
    font-size: 14px;
    font-weight: 700;
}

#progressStatus {
    color: #6c757d;
    font-size: 15px;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 480px) {
    .login-card,
    .loading-card,
    .home-card {
        padding: 30px 20px;
        margin: 0 10px;
    }
    
    .home-container {
        max-width: 100%;
    }
    
    .otp-input {
        width: 40px;
        height: 50px;
        font-size: 20px;
    }
}
