/* ============================================
   REUSABLE COMPONENTS
   ============================================ */

/* Invoice Row Component */
.invoice-row {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s ease;
    font-family: 'Raleway', sans-serif;
    background-color: #ffffff;
}

.invoice-row:hover {
    background-color: #fafafa;
}

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

.invoice-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #ff8c00;
}

.invoice-number {
    font-weight: 500;
    color: #333333;
}

.invoice-amount {
    font-weight: 500;
    color: #333333;
}

.invoice-date {
    color: #666666;
    font-size: 0.95rem;
}

.status-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: 'Raleway', sans-serif;
}

.status-badge.cleared {
    background-color: #f3ffef;
    color: #2e7d32;
    font-weight: 500;
}

.status-badge.pending {
    background-color: #fff3e0;
    color: #e65100;
}

.status-badge.overdue {
    background-color: #ffebee;
    color: #c62828;
}

.invoice-action {
    text-align: right;
}

.invoice-action-link {
    color: #ff8c00;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.invoice-action-link:hover {
    color: #e07b00;
    text-decoration: underline;
}

/* Card Component */
.card {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.card-header {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333333;
    margin-bottom: 1rem;
    font-family: 'Raleway', sans-serif;
}

/* Button Component */
.btn-primary {
    background-color: #ff8c00;
    color: #ffffff;
    border: none;
    border-radius: 0;
    padding: 12px 24px;
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: #e07b00;
}

.btn-secondary {
    background-color: transparent;
    color: #ff8c00;
    border: 1px solid #ff8c00;
    border-radius: 0;
    padding: 12px 24px;
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #ff8c00;
    color: #ffffff;
}

/* Form Input Component */
.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    font-family: 'Raleway', sans-serif;
    font-size: 1rem;
    background-color: transparent;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    border-color: #ff8c00;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(255, 140, 0, 0.25);
}

.form-label {
    font-family: 'Raleway', sans-serif;
    font-weight: 500;
    color: #222222;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    display: block;
}

/* Account Page Common Styles */
.account-header {
    background-color: #2f2e2e;
    width: 100%;
}

.account-header-inner {
    max-width: 1500px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.account-header .logo a {
    display: inline-block;
    text-decoration: none;
}

.account-header .logo img {
    height: 50px;
    width: auto;
    display: block;
}

.account-header nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.account-header nav a {
    color: #ffffff!important;
    text-decoration: none!important;
    font-family: 'Raleway', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    transition: color 0.3s ease;
}

.account-header nav a:hover,
.account-header nav a.active {
    color: #ff8c00;
}

.account-header .logout-btn {
    background-color: #ff8c00;
    color: #ffffff!important;
    border: none;
    padding: 10px 30px;
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.account-header .logout-btn:hover {
    background-color: #e07b00;
}

.account-container {
    display: flex;
    align-items: stretch;
    max-width: calc(1500px - 4%);
    width: calc(100% - 4%);
    border-radius: 50px;
    overflow: hidden;
    margin: 2% auto;
    min-height: 70vh;
}

.account-left {
    width: 65%;
    flex-shrink: 0;
    background-color: #fff9f2;
    padding: 2rem;
    overflow: hidden;
}

.account-right {
    width: 35%;
    flex-shrink: 0;
    background-color: #fff9f2;
    position: relative;
    overflow: hidden;
}

.account-right img {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 129%;
    object-fit: cover;
    object-position: right center;
}

/* Credit Card Box Styles */
.credit-cards-list {
    width: 100%;
}

.credit-card-box {
    background-color: #faf8f5;
    border: 1px solid #e8e6e3;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: box-shadow 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.credit-card-box:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.credit-card-box.selected {
    border-color: #ff8c00;
    background-color: #fff9f2;
}

.credit-card-radio {
    width: 24px;
    height: 24px;
    cursor: pointer;
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 1px solid #333333;
    border-radius: 50%;
    background-color: transparent;
    position: relative;
    margin: 0;
    transition: all 0.2s ease;
}

.credit-card-radio:checked {
    border-color: #333333;
    background-color: transparent;
}

.credit-card-radio:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #ff8c00;
}

.credit-card-radio:hover {
    border-color: #ff8c00;
}

.credit-card-logo {
    width: 50px;
    height: auto;
    object-fit: contain;
}

.credit-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.credit-card-number {
    font-family: 'Raleway', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: #333333;
    margin: 0;
}

.credit-card-address {
    font-family: 'Raleway', sans-serif;
    font-size: 0.9rem;
    color: #666666;
    margin: 0;
}

.credit-card-delete {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.credit-card-delete:hover {
    opacity: 1;
}

.credit-card-delete img {
    width: 36px;
    height: 36px;
    display: block;
}

/* Add New Card Form Styles */
.add-card-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.back-to-cards-btn {
    background-color: transparent;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 20px;
    font-family: 'Raleway', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    color: #333333;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.back-to-cards-btn:hover {
    background-color: #f5f5f5;
    border-color: #ff8c00;
    color: #ff8c00;
}

.back-to-cards-btn svg {
    width: 20px;
    height: 20px;
}

.add-card-form .form-group {
    margin-bottom: 1.5rem;
}

.add-card-form .form-label {
    font-family: 'Raleway', sans-serif;
    font-weight: 500;
    color: #222222;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    display: block;
}

.add-card-form .form-control {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    font-family: 'Raleway', sans-serif;
    font-size: 1rem;
    background-color: transparent;
    transition: border-color 0.2s ease;
}

.add-card-form .form-control:focus {
    border-color: #ff8c00;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(255, 140, 0, 0.25);
}

.add-card-form .form-control::placeholder {
    color: #4D4D4D9C;
}

.card-number-wrapper {
    position: relative;
}

.card-logos {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.card-logo-small {
    width: 35px;
    height: auto;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

.expiry-date-wrapper {
    position: relative;
}

.expiry-date-wrapper .form-control {
    padding-right: 50px;
}

.calendar-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.terms-section {
    margin: 2rem 0;
    padding: 1rem 0;
}

.terms-text {
    font-family: 'Raleway', sans-serif;
    font-size: 0.85rem;
    color: #4D4D4D9C;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #ff8c00;
}

.checkbox-wrapper label {
    font-family: 'Raleway', sans-serif;
    font-size: 0.9rem;
    color: #4D4D4D9C;
    cursor: pointer;
    margin: 0;
}

.save-card-btn {
    width: 100%;
    background-color: #ff8c00;
    color: #ffffff;
    border: none;
    border-radius: 0;
    padding: 14px 30px;
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 1rem;
}

.save-card-btn:hover {
    background-color: #e07b00;
}

/* Responsive for add card form */
@media (max-width: 768px) {
    .add-card-form-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .card-logos {
        position: static;
        transform: none;
        margin-top: 0.5rem;
        justify-content: flex-start;
    }

    .card-number-wrapper .form-control {
        padding-right: 16px;
    }
}

.credit-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.credit-card-title {
    font-family: 'Raleway', sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: #333333;
    margin: 0;
}

.add-card-btn {
    background-color: #ff8c00;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-card-btn:hover {
    background-color: #e07b00;
}

.add-card-btn svg {
    width: 18px;
    height: 18px;
    fill: #ffffff;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .account-right {
        display: none;
    }

    .account-left {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .invoice-row {
        flex-wrap: wrap;
        padding: 1rem;
    }

    .invoice-number,
    .invoice-amount,
    .invoice-date,
    .invoice-status,
    .invoice-action {
        flex: 1 1 50%;
        margin-bottom: 0.5rem;
    }

    .invoice-action {
        text-align: left;
    }

    .account-header-inner {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .account-header nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .account-left {
        padding: 1.5rem;
    }

    .credit-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .credit-card-box {
        flex-wrap: wrap;
    }
}

