:root {
    --skeleton-base: #e9edf2;
    --skeleton-shine: #f6f8fa;
}

.account-section {
    padding: 40px 5% 60px 5%;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    flex-grow: 1;
}

.account-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    min-height: 80px;
}

.account-avatar-lg {
    position: absolute;
    left: 0;
    top: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--dark-blue);
    color: var(--white);
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    flex-shrink: 0;
}

.account-header-info {
    text-align: center;
}

.account-header-info h2 {
    color: var(--dark-blue);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.account-header-info p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.account-type-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--bright-green);
    background: rgba(0,128,0,0.08);
    padding: 4px 12px;
    border-radius: 20px;
    margin-top: 8px;
}

.details-card {
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    border: 1px solid #eaeaea;
    padding: 30px;
    margin-bottom: 25px;
}

.details-card h3 {
    color: var(--dark-blue);
    font-size: 1.1rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.details-card h3 i {
    color: var(--bright-green);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 15px;
}

.detail-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-label {
    font-size: 0.85rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.detail-label i {
    width: 16px;
    text-align: center;
    color: var(--dark-blue);
}

.detail-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    text-align: right;
    word-break: break-word;
}

.detail-value.muted {
    color: var(--text-light);
    font-weight: 400;
    font-style: italic;
}

.state-panel {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    border: 1px solid #eaeaea;
}

.state-panel i {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 20px;
    display: block;
}

.state-panel h3 {
    color: var(--dark-blue);
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.state-panel p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.state-panel pre {
    text-align: left;
    background: #fff5f5;
    border: 1px solid #ffd7d7;
    color: #a33;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    overflow-x: auto;
    margin-bottom: 20px;
    white-space: pre-wrap;
    word-break: break-word;
}

.state-panel .diag-list {
    text-align: left;
    background: #f4f8fb;
    border: 1px solid #dbe6f0;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 0.8rem;
    color: #333;
}

.state-panel .diag-list div {
    padding: 4px 0;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.state-panel .diag-ok { color: #2a8f2a; }
.state-panel .diag-bad { color: #d9534f; font-weight: 700; }

.state-panel a.shop-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bright-green);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
}

.state-panel a.shop-link:hover {
    background-color: var(--dark-blue);
}

.skeleton-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.skeleton {
    position: relative;
    overflow: hidden;
    background-color: var(--skeleton-base);
    border-radius: 8px;
}

.skeleton::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, var(--skeleton-shine), transparent);
    animation: skeleton-shine 1.4s infinite;
}

@keyframes skeleton-shine {
    100% { transform: translateX(100%); }
}

.skeleton-avatar-lg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton-line {
    height: 16px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.skeleton-header-lines {
    flex: 1;
    min-width: 180px;
}

.skeleton-line.w-60 { width: 60%; height: 22px; }
.skeleton-line.w-40 { width: 40%; }
.skeleton-line.w-30 { width: 30%; height: 20px; border-radius: 20px; }

.skeleton-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 15px;
}

.skeleton-detail-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.skeleton-line.label { width: 35%; height: 14px; }
.skeleton-line.value { width: 40%; height: 14px; margin-bottom: 0; }

.settings-card {
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    border: 1px solid #eaeaea;
    padding: 30px;
}

.settings-card h3 {
    color: var(--dark-blue);
    font-size: 1.1rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-card h3 i {
    color: var(--bright-green);
}

.settings-list {
    display: flex;
    flex-direction: column;
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 4px;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    background: transparent;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}

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

.settings-item:hover {
    background: #f7f9fb;
}

.settings-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-item-left i {
    width: 18px;
    text-align: center;
    color: var(--dark-blue);
}

.settings-item > i.fa-chevron-right {
    color: #bbb;
    font-size: 0.85rem;
}

.settings-item-danger .settings-item-left,
.settings-item-danger .settings-item-left i {
    color: #c62828;
}

.settings-item-danger:hover {
    background: #fdecea;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background: var(--white);
    border-radius: 18px;
    padding: 28px;
    width: 100%;
    max-width: 440px;
    max-height: 85vh;
    overflow-y: auto;
    transform: translateY(15px);
    transition: transform 0.25s;
    box-shadow: 0 25px 60px rgba(0,0,0,0.2);
}

.modal-overlay.open .modal-box {
    transform: translateY(0);
}

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

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark-blue);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-header h3 i {
    color: var(--bright-green);
}

.modal-close {
    background: #f4f4f4;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.95rem;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #fdecea;
    color: #c62828;
}

.modal-msg {
    padding: 0.7rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 14px;
}

.modal-msg.error {
    background: #fdecea;
    color: #b71c1c;
    border: 1px solid #f5c6cb;
}

.modal-msg.success {
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #c8e6c9;
}

.modal-msg.hidden {
    display: none;
}

.modal-warning {
    font-size: 0.85rem;
    color: #a33;
    background: #fff5f5;
    border: 1px solid #ffd7d7;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 16px;
    line-height: 1.4;
}

.modal-text {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 18px;
    line-height: 1.5;
}

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

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 0.92rem;
    font-family: inherit;
    background: #fafafa;
    outline: none;
    color: #111;
    transition: border 0.2s, background 0.2s;
}

.form-group input:focus {
    border-color: var(--bright-green);
    background: #fff;
}

.modal-submit-btn {
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--bright-green);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.2s;
    margin-top: 6px;
}

.modal-submit-btn:hover {
    background: var(--dark-blue);
}

.modal-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.modal-submit-danger {
    background: #c62828;
}

.modal-submit-danger:hover {
    background: #a31f1f;
}

.support-contact-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
    color: var(--text-dark);
}

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

.support-contact-row i {
    width: 18px;
    text-align: center;
    color: var(--bright-green);
}

@media (max-width: 600px) {
    .account-section { padding: 20px 15px 40px 15px; }
    .account-header { flex-direction: column; }
    .account-avatar-lg { position: static; margin-bottom: 10px; }
    .details-card { padding: 20px; }
    .detail-row { flex-direction: column; align-items: flex-start; gap: 4px; }
    .detail-value { text-align: left; }
    .skeleton-header { flex-direction: column; text-align: center; }
    .settings-card { padding: 20px; }
    .modal-box { padding: 20px; }
}