/* Min Profil – dark card layout matching reference design */

.profil-main {
    padding: calc(72px + 3rem) 0 4rem;
    min-height: 100vh;
    background: var(--black);
}

.profil-require-login {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray-light);
}

.profil-require-login p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.profil-content {
    max-width: 1080px;
    margin: 0 auto;
}

.profil-page-title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
}

.profil-page-intro {
    color: var(--gray-light);
    font-size: 1rem;
    margin-bottom: 2.5rem;
}

/* Cards – Evelon charcoal, rounded */
.profil-card {
    background: var(--charcoal);
    border: 1px solid var(--gray-dark);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.profil-card-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 1.25rem;
    border-bottom: 1px solid rgba(0, 255, 156, 0.2);
    padding-bottom: 0.6rem;
}

.profil-card-icon {
    color: var(--evelon-green);
    font-size: 1rem;
    opacity: 0.95;
}

.profil-card-subtitle {
    font-size: 0.9rem;
    color: var(--gray-light);
    margin-bottom: 1rem;
}

.profil-card-title--inline {
    margin-bottom: 0.35rem;
    border-bottom: none;
    padding-bottom: 0;
}

/* Mine karakterer */
.profil-card-characters {
    background: linear-gradient(165deg, rgba(21, 41, 34, 0.35) 0%, rgba(11, 15, 13, 0.92) 100%);
    border-color: rgba(0, 255, 156, 0.14);
}

.profil-characters-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    margin-bottom: 1.25rem;
}

.profil-characters-subtitle {
    margin-bottom: 0;
}

.profil-characters-updated {
    margin: 0;
    font-size: 0.78rem;
    color: rgba(160, 179, 170, 0.85);
    white-space: nowrap;
}

.profil-characters-loading {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--gray-light);
    font-size: 0.92rem;
    padding: 1rem 0;
}

.profil-characters-loading i {
    color: var(--evelon-green);
}

.profil-characters-error {
    padding: 1rem 1.1rem;
    border-radius: var(--radius);
    border: 1px solid rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.08);
    color: #fca5a5;
    font-size: 0.9rem;
}

.profil-characters-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--gray-light);
}

.profil-characters-empty-icon {
    font-size: 2rem;
    color: rgba(0, 255, 156, 0.35);
    margin-bottom: 0.75rem;
}

.profil-characters-empty-hint {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    opacity: 0.85;
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
}

.profil-characters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.profil-char-card {
    border: 1px solid rgba(0, 255, 156, 0.14);
    border-radius: var(--radius-lg);
    background: rgba(8, 12, 10, 0.72);
    padding: 1.15rem 1.2rem 1.1rem;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.profil-char-card:hover {
    border-color: rgba(0, 255, 156, 0.28);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28), 0 0 24px rgba(0, 255, 156, 0.06);
    transform: translateY(-2px);
}

.profil-char-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.profil-char-card-identity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.profil-char-avatar-wrap {
    position: relative;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
}

.profil-char-avatar {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(0, 255, 156, 0.22);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
}

.profil-char-avatar--photo {
    display: block;
    background: rgba(0, 0, 0, 0.35);
}

.profil-char-avatar--initials {
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, rgba(0, 255, 156, 0.16) 0%, rgba(0, 255, 156, 0.05) 100%);
    color: var(--evelon-green);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.profil-char-name {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
}

.profil-char-id-pill {
    display: inline-block;
    font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
    font-size: 0.72rem;
    color: rgba(160, 179, 170, 0.95);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 0.12rem 0.5rem;
}

.profil-char-card-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    flex-shrink: 0;
}

.profil-char-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 0.26rem 0.5rem;
    border: 1px solid transparent;
}

.profil-char-tag--gang {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.28);
}

.profil-char-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 0.28rem 0.55rem;
    border: 1px solid transparent;
}

.profil-char-status--alive {
    color: #86efac;
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.28);
}

.profil-char-status--dead {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.28);
}

.profil-char-status--disabled {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.28);
}

.profil-char-rows {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.profil-char-row {
    display: grid;
    grid-template-columns: 1.1rem 1fr auto;
    gap: 0.55rem 0.65rem;
    align-items: center;
    font-size: 0.86rem;
}

.profil-char-row-icon {
    color: var(--evelon-green);
    opacity: 0.9;
    text-align: center;
}

.profil-char-row-label {
    color: var(--gray-light);
}

.profil-char-row-value {
    color: var(--white);
    font-weight: 600;
    text-align: right;
}

.profil-char-row-value--mono {
    font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
    font-size: 0.8rem;
    font-weight: 500;
}

@media (max-width: 640px) {
    .profil-characters-grid {
        grid-template-columns: 1fr;
    }

    .profil-char-card-top {
        flex-direction: column;
        align-items: stretch;
    }

    .profil-char-status {
        align-self: flex-start;
    }
}

/* Brugerinformation block */
.profil-user-block {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.profil-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.profil-user-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.profil-username {
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--white);
}

.profil-discord-id {
    font-size: 0.85rem;
    color: var(--gray-light);
    font-family: ui-monospace, monospace;
}

/* Meta row: Medlem siden, Total spilletid */
.profil-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 2rem;
}

.profil-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--gray-light);
}

.profil-meta-icon {
    color: var(--evelon-green);
    opacity: 0.9;
    font-size: 0.9rem;
}

.profil-meta-item strong {
    color: var(--white);
    font-weight: 600;
}

/* Discord roles */
.profil-roles-wrap {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(0, 255, 156, 0.15);
}

.profil-roles-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.75rem;
}

.profil-roles-title .profil-card-icon {
    font-size: 0.9rem;
}

.profil-roles-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.profil-role-pill {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-light);
    background: rgba(0, 255, 156, 0.1);
    border: 1px solid rgba(0, 255, 156, 0.25);
    border-radius: 999px;
}

.profil-roles-empty {
    font-size: 0.9rem;
    color: var(--gray-light);
    margin: 0;
}

/* Applications list */
.profil-applications-loading {
    color: var(--gray-light);
    font-size: 0.95rem;
    padding: 0.5rem 0;
}

.profil-applications-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.profil-application-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    background: rgba(0, 255, 156, 0.04);
    border: 1px solid var(--gray-dark);
    border-radius: var(--radius);
    transition: border-color var(--transition), background var(--transition);
}

.profil-application-item:hover {
    background: rgba(0, 255, 156, 0.08);
    border-color: rgba(0, 255, 156, 0.3);
}

.profil-application-left {
    flex: 1;
    min-width: 0;
}

.profil-application-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--white);
    display: block;
    margin-bottom: 0.2rem;
}

.profil-application-date {
    font-size: 0.85rem;
    color: var(--gray-light);
}

.profil-application-approved-msg {
    display: block;
    font-size: 0.9rem;
    color: var(--evelon-green);
    font-weight: 500;
    margin-top: 0.25rem;
}

.profil-application-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Status pill – Evelon green palette */
.profil-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
}

.profil-status-pill--pending {
    background: rgba(0, 255, 156, 0.25);
    color: var(--neon-green);
    border: 1px solid rgba(0, 255, 156, 0.4);
}

.profil-status-pill--accepted {
    background: var(--evelon-green);
    color: var(--black);
}

.profil-status-pill--rejected {
    background: rgba(239, 68, 68, 0.25);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.profil-status-pill--invited_to_interview {
    background: rgba(43, 255, 136, 0.2);
    color: var(--neon-green);
    border: 1px solid rgba(43, 255, 136, 0.4);
}

/* Rediger button – Evelon outline */
.profil-btn-edit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-light);
    background: transparent;
    border: 1px solid var(--gray-dark);
    border-radius: var(--radius);
    font-family: var(--font);
    cursor: pointer;
    text-decoration: none;
    transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.profil-btn-edit:hover {
    border-color: var(--evelon-green);
    background: rgba(0, 255, 156, 0.08);
    color: var(--evelon-green);
}

.profil-btn-edit i {
    font-size: 0.8rem;
    opacity: 0.9;
}

.profil-application-btn-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.profil-btn-ansog-igen {
    color: var(--evelon-green) !important;
    border-color: var(--evelon-green) !important;
    text-decoration: none;
}

.profil-btn-ansog-igen:hover {
    background: var(--evelon-green) !important;
    color: var(--black) !important;
}

/* Empty state */
.profil-applications-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--gray-light);
}

.profil-applications-empty p {
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* Submission detail modal (profil) */
.profil-submission-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}
.profil-submission-modal.hidden {
    display: none;
}
.profil-submission-modal-box {
    background: var(--gray-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.profil-submission-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.profil-submission-modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--white);
    margin: 0;
}
.profil-submission-modal-close {
    background: none;
    border: none;
    color: var(--gray-light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
}
.profil-submission-modal-close:hover {
    color: var(--white);
}
.profil-submission-modal-body {
    padding: 1.5rem;
}
.profil-submission-status {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    color: var(--white);
    font-weight: 600;
    margin-bottom: 1rem;
}
.profil-submission-meta {
    color: var(--gray-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}
.profil-submission-responses {
    margin-top: 1rem;
}
.profil-submission-response {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    margin-bottom: 0.75rem;
}
.profil-submission-response strong {
    color: var(--white);
    display: block;
    margin-bottom: 0.5rem;
}
.profil-submission-response span {
    color: var(--gray-light);
    white-space: pre-wrap;
}
.profil-submission-comments {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.profil-submission-comments h4 {
    font-size: 1rem;
    color: var(--white);
    margin-bottom: 0.75rem;
}
.profil-submission-comment {
    padding: 0.75rem;
    background: rgba(0, 255, 136, 0.06);
    border-left: 3px solid var(--evelon-green);
    border-radius: 0 4px 4px 0;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--gray-light);
}

/* ── Twitch-tilknytning ────────────────────────────────────── */

.profil-card-twitch .profil-card-icon {
    color: #9146FF;
}

.profil-twitch-form {
    margin-top: 0.5rem;
}

.profil-twitch-input-row {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 1rem;
    background: var(--black);
    border: 1px solid var(--gray-dark);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color var(--transition);
}

.profil-twitch-input-row:focus-within {
    border-color: #9146FF;
}

.profil-twitch-prefix {
    padding: 0.65rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-light);
    background: rgba(145, 70, 255, 0.1);
    white-space: nowrap;
    user-select: none;
}

.profil-twitch-input {
    flex: 1;
    padding: 0.65rem 0.75rem;
    font-size: 0.95rem;
    font-family: var(--font);
    color: var(--white);
    background: transparent;
    border: none;
    outline: none;
    min-width: 0;
}

.profil-twitch-input::placeholder {
    color: rgba(191, 187, 255, 0.4);
}

.profil-twitch-btn {
    background: #9146FF;
    border-color: #9146FF;
    color: var(--white);
}

.profil-twitch-btn:hover {
    background: #7c3aed;
    border-color: #7c3aed;
    box-shadow: 0 6px 24px rgba(145, 70, 255, 0.4);
}

.profil-twitch-error {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #f87171;
}

.profil-twitch-linked {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 1.1rem;
    background: rgba(145, 70, 255, 0.08);
    border: 1px solid rgba(145, 70, 255, 0.25);
    border-radius: var(--radius);
}

.profil-twitch-linked-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.profil-twitch-linked-icon {
    font-size: 1.5rem;
    color: #9146FF;
}

.profil-twitch-linked-label {
    display: block;
    font-size: 0.8rem;
    color: var(--gray-light);
    margin-bottom: 0.1rem;
}

.profil-twitch-linked-name {
    display: block;
    font-weight: 600;
    font-size: 1rem;
    color: #9146FF;
    text-decoration: none;
    transition: color var(--transition);
}

.profil-twitch-linked-name:hover {
    color: #7c3aed;
}

.profil-twitch-unlink-btn {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-color: rgba(248, 113, 113, 0.4);
    color: #f87171;
}

.profil-twitch-unlink-btn:hover {
    border-color: #f87171;
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
}

.profil-twitch-no-role {
    font-size: 0.95rem;
    color: var(--gray-light);
}

.profil-twitch-no-role strong {
    color: #9146FF;
}

@media (max-width: 640px) {
    .profil-application-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .profil-application-right {
        width: 100%;
        justify-content: flex-start;
    }
}
