:root {
    --color-primary: #009966;
    --color-primary-dark: #007a55;
    --color-bg-dark: #0f172a;
    --color-bg-page: #f9fafb;
    --color-text-dark: #0f172b;
    --color-text-secondary: #45556c;
    --color-text-muted: #99a1af;
    --color-white: #ffffff;
    --color-border: #e5e7eb;
    --color-border-dark: #d1d5dc;
    --color-red-error: #e7000b;
    --font-family: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.secondary-nav {
    background-color: var(--color-white);
    border-bottom: 1px solid var(--color-border);
}

.sec-nav-container {
    max-width: 1504px;
    margin: 0 auto;
    padding: 0 136px;
    display: flex;
    gap: 32px;
}

.sec-nav-link {
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.18px;
    color: #45556c;
    text-decoration: none;
    padding: 20px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.sec-nav-link:hover {
    color: var(--color-primary);
}

.sec-nav-link.active {
    color: var(--color-primary);
    font-weight: 600;
    border-bottom-color: var(--color-primary);
}

.main-content {
    min-height: calc(100vh - 84px - 72px - 296px);
    padding: 32px 0 48px;
}

.content-container {
    max-width: 1504px;
    margin: 0 auto;
    padding: 0 136px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.page-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.page-title {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.75px;
    line-height: 36px;
    color: var(--color-text-dark);
}

.page-description {
    font-size: 16px;
    font-weight: 400;
    color: var(--color-text-secondary);
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.account-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
}

.account-card.full-width {
    grid-column: 1 / -1;
}

.card-header {
    padding: 20px 24px;
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.card-icon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.card-body {
    padding: 24px;
}

.info-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.info-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-group:first-child {
    padding-top: 0;
}

.info-label {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
}

.info-value {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    text-align: right;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.badge-primary {
    background-color: #ecfdf5;
    color: #059669;
}

.badge-secondary {
    background-color: #f3f4f6;
    color: #6b7280;
}

.stat-row {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
}

.stat-row:last-child {
    margin-bottom: 0;
}

.stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    background-color: #f9fafb;
    border-radius: 12px;
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #009966;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
}

.quick-actions {
    margin-bottom: 32px;
}

.actions-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.action-card:hover {
    border-color: #009966;
    box-shadow: 0 4px 12px rgba(0, 153, 102, 0.1);
    transform: translateY(-2px);
}

.action-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ecfdf5;
    border-radius: 12px;
}

.action-icon img {
    width: 24px;
    height: 24px;
}

.action-label {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.btn-edit {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 6px;
    margin-left: 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.btn-edit:hover {
    background-color: #f3f4f6;
}

.password-section {
    margin-bottom: 32px;
}

.password-info {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 16px;
}

.change-password-modal {
    text-align: left;
}

.change-password-label {
    display: block;
    margin-bottom: 8px;
    color: #111827;
    font-size: 14px;
    font-weight: 600;
}

.change-password-field {
    position: relative;
    width: 100%;
}

.change-password-input.swal2-input {
    width: 100%;
    height: 52px;
    margin: 0;
    padding: 0 48px 0 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: #f9fafb;
    color: #111827;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    box-shadow: none;
}

.change-password-input.swal2-input:focus {
    border-color: #009966;
    box-shadow: 0 0 0 3px rgba(0, 153, 102, 0.1);
}

.change-password-toggle {
    position: absolute;
    top: 50%;
    right: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    opacity: 0.55;
    transform: translateY(-50%);
    transition: opacity 0.2s ease;
}

.change-password-toggle:hover {
    opacity: 0.85;
}

.change-password-eye {
    width: 20px;
    height: 20px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: #009966;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-primary:hover {
    background-color: #008855;
}

.btn-primary img {
    width: 16px;
    height: 16px;
}

.addresses-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.address-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.addresses-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.address-type-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

.address-type-badge.invoice {
    color: #9333ea;
    background: #faf5ff;
}

.address-type-badge.delivery {
    color: #2563eb;
    background: #eff6ff;
}

.address-card.invoice {
    border-color: #e9d5ff;
    background-color: #fdfaff;
}

.address-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    transition: border-color 0.2s;
}

.address-card.default {
    border-color: #009966;
    background-color: #f0fdf4;
}

.address-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.address-title {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.address-default-badge {
    font-size: 11px;
    font-weight: 600;
    color: #059669;
    background: #ecfdf5;
    padding: 2px 8px;
    border-radius: 4px;
}

.address-detail {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 4px;
}

.address-detail strong {
    color: #374151;
    font-weight: 500;
}

.address-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 8px;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: none;
    border: 1px solid #d1d5dc;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.btn-outline.btn-danger {
    color: #dc2626;
    border-color: #fca5a5;
}

.btn-outline.btn-danger:hover {
    background-color: #fef2f2;
    border-color: #dc2626;
}

.text-muted {
    color: #9ca3af;
    font-size: 14px;
}

.no-addresses {
    text-align: center;
    padding: 32px;
    color: #9ca3af;
}

@media (max-width: 1400px) {
    .sec-nav-container {
        padding: 0 32px;
    }

    .content-container {
        padding: 0 32px;
    }
}

@media (max-width: 1024px) {
    .account-grid {
        grid-template-columns: 1fr;
    }

    .actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sec-nav-container {
        padding: 0 16px;
        gap: 20px;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .sec-nav-container::-webkit-scrollbar {
        display: none;
    }

    .sec-nav-link {
        font-size: 14px;
        padding: 16px 0;
    }
}

@media (max-width: 640px) {
    .addresses-grid {
        grid-template-columns: 1fr;
    }

    .actions-grid {
        grid-template-columns: 1fr;
    }

    .stat-row {
        flex-direction: column;
        gap: 12px;
    }

    .info-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .info-value {
        text-align: left;
    }
}
