/* ==============================================
   ACCOUNT PAGE SPECIFIC STYLES
   ============================================== */

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    color: white;
    padding: 4rem 0 2rem;
    margin-bottom: 2rem;
}

.header-content {
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Dashboard Layout */
.account-dashboard {
    padding: 2rem 0 4rem;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Sidebar Navigation */
.dashboard-sidebar {
    background: var(--bg-white);
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    padding: 2rem 0;
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem 2rem;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: var(--bg-light);
    color: var(--accent-color);
}

.nav-item.active {
    background: rgba(128, 90, 213, 0.1);
    color: var(--accent-color);
    border-left-color: var(--accent-color);
}

.nav-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.nav-item.active svg {
    opacity: 1;
}

/* Logout Nav Item */
.nav-item-logout {
    background: none;
    border: none;
    color: var(--error-color);
}

.nav-item-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-left-color: #dc2626;
}

/* Main Content */
.dashboard-content {
    background: var(--bg-white);
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.content-section {
    display: none;
    padding: 2.5rem;
}

.content-section.active {
    display: block;
}

.section-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.section-header h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-light);
    font-size: 1rem;
}


/* Form Sections */
.form-section {
    background: var(--bg-white);
    padding: 1.5rem 0;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--bg-white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(128, 90, 213, 0.1);
}

.form-group input[readonly] {
    background: var(--bg-light);
    color: var(--text-light);
    cursor: not-allowed;
}

.form-help {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    display: block;
}

.form-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Profile Cards */
.profile-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-item label {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.75rem 0;
    border-bottom: 2px solid var(--border-color);
}

.info-value .loading-text {
    color: var(--text-light);
    font-style: italic;
}

/* Security Cards */
.security-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.security-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.security-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    position: relative;
}

.strength-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--error-color);
    transition: all 0.3s ease;
}

.strength-bar.weak::after {
    width: 33%;
    background: var(--error-color);
}

.strength-bar.medium::after {
    width: 66%;
    background: #f39c12;
}

.strength-bar.strong::after {
    width: 100%;
    background: var(--success-color);
}

.strength-text {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Activity List */
.activity-list {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-info strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.25rem;
}

.activity-info span {
    color: var(--text-light);
    font-size: 0.9rem;
}

.activity-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.activity-status.current {
    background: rgba(72, 187, 120, 0.1);
    color: var(--success-color);
}

/* Products Section */
.products-actions {
    margin-bottom: 2rem;
    display: flex;
    justify-content: flex-start;
}

.products-actions .btn {
    display: inline-flex;
    align-items: center;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(128, 90, 213, 0.15);
    transform: translateY(-2px);
}

.product-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.product-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.product-card-title {
    flex: 1;
}

.product-card-title h3 {
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.product-card-title .product-code {
    color: var(--text-light);
    font-size: 0.85rem;
}

.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.product-activation-date {
    color: var(--text-light);
    font-size: 0.85rem;
}

.product-view-btn {
    color: var(--accent-color);
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.empty-products {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.empty-products svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-products h3 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.empty-products p {
    margin-bottom: 1.5rem;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 1rem;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-white);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
    width: 100%;
    animation: modalSlideIn 0.3s ease;
}

.modal-medium {
    max-width: 600px;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.modal-body {
    padding: 2rem;
}

/* Product Details Modal */
.product-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.detail-label {
    color: var(--text-light);
    font-weight: 500;
}

.detail-value {
    color: var(--primary-color);
    font-weight: 600;
}

.detail-section {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.detail-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.product-infos-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-infos-list li {
    padding: 0.75rem 0 0.75rem 1.5rem;
    position: relative;
    color: var(--text-dark);
    line-height: 1.6;
}

.product-infos-list li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* Product Activation Modal */
.activation-info {
    background: rgba(128, 90, 213, 0.1);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--accent-color);
}

.activation-info p {
    margin: 0;
    color: var(--text-dark);
    line-height: 1.6;
}

.activation-code-inputs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.activation-code-part {
    width: 80px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.activation-code-part:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(128, 90, 213, 0.1);
}

.activation-separator {
    color: var(--text-light);
    font-size: 1.5rem;
    font-weight: 600;
}

.activation-form-actions {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.activation-form-actions .btn {
    min-width: 200px;
}

/* Preferences Cards */
.preferences-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.preferences-card h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.preference-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.preference-item:last-child {
    border-bottom: none;
}

.preference-info strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.25rem;
}

.preference-info p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: .4s;
    border-radius: 24px;
}

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

input:checked + .toggle-slider {
    background-color: var(--accent-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Offers Section */
.offers-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.offer-card {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.offer-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(128, 90, 213, 0.15);
}

.offer-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.offer-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.offer-card-title {
    flex: 1;
}

.offer-card-title h3 {
    color: var(--primary-color);
    margin: 0;
    font-size: 1.2rem;
}

.offer-card-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.offer-code-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.offer-code-section label {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.offer-code-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.offer-code {
    flex: 1;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 0.1em;
    font-family: 'Courier New', monospace;
}

.copy-code-btn {
    background: var(--accent-color);
    border: none;
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.copy-code-btn:hover {
    background: #6d4db8;
    transform: scale(1.05);
}

.copy-code-btn:active {
    transform: scale(0.95);
}

.empty-offers {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.empty-offers svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-offers h3 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.empty-offers p {
    margin: 0;
}

/* Message Toast */
.message-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 1rem 1.5rem;
    z-index: 10000;
    max-width: 400px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.message-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.message-toast.success {
    border-left: 4px solid var(--success-color);
}

.message-toast.error {
    border-left: 4px solid var(--error-color);
}

.message-toast.info {
    border-left: 4px solid var(--accent-color);
}

.toast-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.toast-close:hover {
    color: var(--text-dark);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .page-header {
        padding: 2rem 0 1rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .dashboard-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .dashboard-sidebar {
        position: static;
        order: 1;
        margin-bottom: 1.5rem;
        padding: 0;
        border-radius: 12px;
        overflow: hidden;
    }

    .sidebar-nav {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
        padding: 0;
        background: var(--bg-light);
    }

    .nav-item {
        flex-shrink: 0;
        padding: 1rem 0.5rem;
        border-left: none;
        border-bottom: none;
        border-right: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
        white-space: nowrap;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        background: var(--bg-white);
        transition: all 0.3s ease;
    }

    .nav-item:nth-child(2n) {
        border-right: none;
    }

    .nav-item:nth-last-child(-n+2) {
        border-bottom: none;
    }

    .nav-item.active {
        background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
        color: white;
        border-left: none;
        border-bottom: none;
    }

    .nav-item svg {
        width: 24px;
        height: 24px;
    }

    .nav-item span {
        display: block;
        font-size: 0.75rem;
        font-weight: 500;
        line-height: 1.2;
    }

    .nav-item-logout {
        grid-column: 1 / -1;
        background: rgba(245, 101, 101, 0.05);
        color: var(--error-color);
        border-bottom: none;
    }

    .nav-item-logout:hover {
        background: rgba(245, 101, 101, 0.1);
    }

    .dashboard-content {
        order: 2;
    }

    .content-section {
        padding: 1.5rem;
    }


    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }


    .preference-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .profile-info-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .products-actions {
        justify-content: center;
    }

    .modal-content {
        max-height: 95vh;
    }

    .message-toast {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.5rem;
    }

    .content-section {
        padding: 1rem;
    }

    .security-card,
    .preferences-card,
    .profile-card {
        padding: 1.5rem;
    }

    .product-card {
        padding: 1.25rem;
    }

    .modal-header {
        padding: 1.5rem 1.5rem 1rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .activation-code-part {
        width: 70px;
        height: 55px;
        font-size: 1.3rem;
    }

    .activation-separator {
        font-size: 1.3rem;
    }

    .sidebar-nav {
        padding: 0 0.5rem;
    }

    .nav-item {
        padding: 0.875rem 0.5rem;
    }

    .nav-item svg {
        width: 22px;
        height: 22px;
    }

    .nav-item span {
        font-size: 0.7rem;
    }
}

/* Loading States */
.loading-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem 0;
}

.loading-section .loading-spinner {
    width: 40px;
    height: 40px;
    border-width: 3px;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    .toggle-slider,
    .toggle-slider:before,
    .message-toast,
    .nav-item {
        transition: none;
    }
}

/* Activation Success */
.activation-success {
    text-align: center;
    padding: 2rem;
}

.activation-success .success-icon {
    margin-bottom: 1.5rem;
}

.activation-success .success-icon svg {
    width: 80px;
    height: 80px;
    color: var(--success-color);
    animation: successPulse 0.6s ease-in-out;
}

@keyframes successPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.activation-success h3 {
    color: var(--success-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.activation-success p {
    color: var(--text-dark);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .dashboard-sidebar,
    .dashboard-content,
    .security-card,
    .preferences-card {
        border: 2px solid var(--text-dark);
    }

    .nav-item.active {
        background: var(--text-dark);
        color: var(--bg-white);
    }
}