/* Ocean Points Banking System - Main Stylesheet */
/* Core Styles */
body {
    font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif;
    background-color: #f5f9ff;
    color: #003366;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #0077be, #00a6fb);
    color: white;
    padding: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 15px 15px;
    margin-bottom: 30px;
    animation: fadeInDown 0.8s ease-out;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.logo-icon {
    margin-right: 10px;
    font-size: 32px;
}

.user-nav {
    display: flex;
    align-items: center;
}

/* Balance Card */
.balance-card {
    background: linear-gradient(135deg, #0077be, #00a6fb);
    border-radius: 15px;
    padding: 25px;
    color: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 30px;
    animation: fadeIn 0.6s ease-out;
}

.balance-display {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    animation: slideInLeft 0.7s ease-out;
}

.points-display {
    display: flex;
    justify-content: space-between;
    animation: slideInRight 0.7s ease-out;
}

.balance-label, .points-label {
    font-size: 18px;
    opacity: 0.9;
}

.balance-amount {
    font-size: 28px;
    font-weight: 700;
    color: #a1ffa1;
}

.points-amount {
    font-size: 24px;
    font-weight: 700;
    color: #ffffa1;
}

/* Transaction List */
.transaction-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease-out;
}

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

.transaction-list {
    max-height: 500px;
    overflow-y: auto;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    margin-bottom: 10px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease-out;
}

.transaction-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.transaction-details {
    flex: 1;
}

.transaction-date {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.transaction-description {
    font-weight: 600;
    margin-bottom: 5px;
}

.transaction-reference {
    font-size: 12px;
    color: #888;
    font-family: monospace;
}

.transaction-amount {
    font-weight: 700;
    text-align: right;
    min-width: 100px;
}

.credit .transaction-amount {
    color: #4CAF50;
}

.debit .transaction-amount {
    color: #F44336;
}

.payment .transaction-amount {
    color: #2196F3;
}

/* Payment Form */
.payment-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.8s ease-out;
}

.form-group {
    margin-bottom: 20px;
    animation: formGroupAppear 0.5s ease-out;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

input[type="text"],
input[type="number"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
    border-color: #00a6fb;
    box-shadow: 0 0 0 3px rgba(0, 166, 251, 0.2);
    outline: none;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background-color: #0077be;
    color: white;
}

.btn-primary:hover {
    background-color: #00a6fb;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 119, 190, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 120px;
    height: 34px;
    margin: 0 10px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #0077be;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #00a6fb;
}

input:checked + .slider:before {
    transform: translateX(86px);
}

.slider-text {
    position: absolute;
    top: 8px;
    left: 15px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.slider-text.right {
    left: auto;
    right: 15px;
}

/* User Profile */
.user-profile {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    animation: fadeIn 0.8s ease-out;
}

.profile-pic {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 3px solid rgba(0, 166, 251, 0.3);
    transition: transform 0.3s ease;
}

.profile-pic:hover {
    transform: scale(1.1);
}

.user-info h2 {
    margin: 0;
    font-size: 1.3rem;
    color: #003366;
}

.user-info p {
    margin: 5px 0 0;
    font-size: 0.9rem;
    color: #666;
}

/* Chart Container */
.chart-container {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-top: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    animation: fadeInUp 0.8s ease-out;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes formGroupAppear {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .user-nav {
        margin-top: 15px;
    }
    
    .balance-display, .points-display {
        flex-direction: column;
    }
    
    .balance-amount, .points-amount {
        margin-top: 5px;
    }
    
    .user-profile {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-pic {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .transaction-item {
        flex-direction: column;
    }
    
    .transaction-amount {
        text-align: left;
        margin-top: 10px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Payment Form Styles */
.payment-section {
    max-width: 600px;
    margin: 0 auto;
}

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

.input-or {
    text-align: center;
    margin: 10px 0;
    font-style: italic;
    color: #666;
}

.recipient-info {
    margin-top: 10px;
    min-height: 30px;
}

.recipient-confirm {
    display: flex;
    align-items: center;
    padding: 8px;
    background: rgba(100, 255, 100, 0.1);
    border-radius: 5px;
}

.recipient-not-found {
    color: #ff6b6b;
    padding: 8px;
}

.recipient-pic {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}

select.form-control {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
/* Recipient styles */
.recipient-pic {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
}

.recipient-found {
    display: flex;
    align-items: center;
    margin-top: 5px;
    padding: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

.recipient-not-found {
    color: #ff6b6b;
    padding: 8px;
}

/* Alert styles */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    animation: slideDown 0.5s ease-out;
}

.alert-success {
    background-color: #dff0d8;
    color: #3c763d;
}

.alert-error {
    background-color: #f2dede;
    color: #a94442;
}

/* Animation styles */
@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 5px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Transaction item styles */
.transaction-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    margin-bottom: 8px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    animation: fadeInUp 0.5s ease-out;
    border-left: 4px solid transparent;
}

.transaction-item.credit {
    border-left-color: #4CAF50;
}

.transaction-item.debit {
    border-left-color: #F44336;
}

.transaction-item.payment {
    border-left-color: #2196F3;
}

.transaction-date {
    color: #666;
    font-size: 0.9em;
    white-space: nowrap;
    margin-right: 15px;
}

.transaction-details {
    flex-grow: 1;
    min-width: 0;
}

.transaction-description {
    font-weight: 500;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.transaction-program {
    color: #666;
    font-size: 0.9em;
}

.transaction-reference {
    color: #666;
    font-size: 0.85em;
}

.transaction-amount {
    font-weight: bold;
    white-space: nowrap;
    margin-left: 15px;
}

.transaction-amount.credit {
    color: #4CAF50;
}

.transaction-amount.debit {
    color: #F44336;
}

.transaction-points {
    color: #FFC107;
    font-size: 0.9em;
    margin-left: 10px;
    white-space: nowrap;
}

.transaction-empty {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}
