/* =========================================================
   TULRUMUS PROFILE v2
   Compact profile layout — full replacement
   /opt/tulrumus/app/web/static/tulrumus-profile.css
   ========================================================= */

:root{
    --profile-bg:#020713;
    --profile-panel:rgba(4,14,32,.91);
    --profile-panel-light:rgba(7,22,47,.90);
    --profile-line:rgba(118,165,226,.20);
    --profile-line-soft:rgba(118,165,226,.11);
    --profile-text:#f4f7fb;
    --profile-muted:#8f9cad;
    --profile-gold:#edb947;
    --profile-gold-light:#ffd66f;
    --profile-cyan:#52e2ec;
    --profile-violet:#d16cff;
}

*{box-sizing:border-box}
html{background:var(--profile-bg)}

body{
    margin:0;
    min-width:320px;
    background:var(--profile-bg);
    color:var(--profile-text);
    font-family:Arial,Helvetica,sans-serif;
    -webkit-font-smoothing:antialiased;
}

button,input{font:inherit}
button{cursor:pointer}

.profile-page{
    position:relative;
    min-height:100vh;
    isolation:isolate;
    overflow-x:hidden;
}

.profile-space-bg{
    position:fixed;
    inset:0;
    z-index:-3;
    background-image:url("/static/tulrumus-home-hero-v2.png?v=7");
    background-size:cover;
    background-position:center;
    background-repeat:no-repeat;
    transform:scale(1.02);
}

.profile-space-overlay{
    position:fixed;
    inset:0;
    z-index:-2;
    background:
        linear-gradient(90deg,rgba(1,6,18,.78),rgba(1,6,18,.34) 62%,rgba(1,6,18,.55)),
        linear-gradient(180deg,rgba(1,6,18,.48),rgba(1,6,18,.76));
}

/* HEADER */

.profile-header{
    width:calc(100% - 54px);
    max-width:1580px;
    height:82px;
    margin:0 auto;
    display:grid;
    grid-template-columns:auto 1fr;
    align-items:center;
    border-bottom:1px solid rgba(142,185,237,.15);
}

.profile-brand{
    display:inline-flex;
    align-items:center;
    gap:11px;
    color:var(--profile-gold);
    text-decoration:none;
}

.profile-brand-mark{
    width:42px;
    height:42px;
    object-fit:cover;
    border-radius:4px;
}

.profile-brand span{
    font-family:Georgia,"Times New Roman",serif;
    font-size:22px;
    letter-spacing:.15em;
}

.profile-brand sup{
    margin-left:2px;
    font:8px Arial,sans-serif;
    vertical-align:top;
}

.profile-header-right{
    justify-self:end;
    display:flex;
    align-items:center;
    gap:20px;
}

.profile-top-nav{
    display:flex;
    gap:9px;
}

.profile-top-nav a{
    min-height:42px;
    padding:0 15px;
    display:inline-flex;
    align-items:center;
    gap:8px;
    border:1px solid rgba(134,163,204,.26);
    border-radius:7px;
    background:rgba(3,11,27,.58);
    color:#d6dee9;
    font-size:11px;
    text-decoration:none;
}

.profile-top-nav a:hover{
    border-color:rgba(235,185,71,.56);
    color:var(--profile-gold-light);
}

.nav-symbol{font-size:17px}

.profile-owner-mini{
    min-width:225px;
    padding-left:20px;
    display:flex;
    align-items:center;
    gap:11px;
    border-left:1px solid rgba(142,185,237,.18);
}

.profile-owner-mini-photo{
    width:42px;
    height:42px;
    flex:0 0 42px;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    border:1px solid var(--profile-gold);
    border-radius:50%;
    background:rgba(15,25,44,.86);
    color:var(--profile-gold);
}

.profile-owner-mini-photo img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.profile-owner-mini-text{
    display:grid;
    gap:3px;
}

.profile-owner-mini-text strong{
    font-size:13px;
    font-weight:500;
}

.profile-owner-mini-text small{
    color:var(--profile-muted);
    font-size:9px;
}

/* LAYOUT */

.profile-layout{
    width:calc(100% - 54px);
    max-width:1580px;
    margin:0 auto;
    display:grid;
    grid-template-columns:165px minmax(0,1fr);
    gap:24px;
    padding:18px 0 26px;
}

.profile-sidebar{
    align-self:start;
}

.profile-sidebar-nav{
    padding:10px;
    display:grid;
    gap:2px;
    border:1px solid rgba(132,174,229,.18);
    border-radius:12px;
    background:linear-gradient(180deg,rgba(5,16,35,.91),rgba(2,10,25,.94));
}

.profile-sidebar-nav a{
    position:relative;
    min-height:52px;
    padding:0 11px;
    display:flex;
    align-items:center;
    gap:10px;
    border:1px solid transparent;
    border-radius:7px;
    color:#e4e9ef;
    font-size:12px;
    text-decoration:none;
}

.profile-sidebar-nav a:not(:last-child)::after{
    content:"";
    position:absolute;
    left:12px;
    right:12px;
    bottom:-2px;
    height:1px;
    background:rgba(143,190,255,.08);
}

.profile-sidebar-nav a:hover{
    color:var(--profile-gold-light);
}

.profile-sidebar-nav a.active{
    border-color:var(--profile-gold);
    background:radial-gradient(circle at 50% 50%,rgba(233,176,62,.15),rgba(21,20,19,.36));
    color:var(--profile-gold-light);
    box-shadow:0 0 16px rgba(235,176,52,.13);
}

.sidebar-icon{
    width:24px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    color:inherit;
    font-size:19px;
}

.cube-icon{color:#dce9ff}

.profile-workspace{
    min-width:0;
}

.profile-title-block{
    min-height:72px;
    padding:2px 22px 10px;
    display:flex;
    flex-direction:column;
    justify-content:center;
}

.profile-title-block h1{
    margin:0 0 7px;
    font-size:clamp(30px,2.5vw,40px);
    line-height:.95;
    font-weight:600;
    letter-spacing:-.045em;
    background:linear-gradient(90deg,#ffffff,#eadcff 45%,#b5a6ff);
    -webkit-background-clip:text;
    background-clip:text;
    color:transparent;
}

.profile-title-block p{
    margin:0;
    color:#d3dae4;
    font-size:12px;
}

/* OWNER CARD */

.owner-profile-card{
    min-height:248px;
    padding:22px 30px;
    display:grid;
    grid-template-columns:190px minmax(0,1fr);
    gap:28px;
    align-items:center;
    border:1px solid var(--profile-line);
    border-radius:14px;
    background:linear-gradient(135deg,rgba(4,16,37,.96),rgba(5,21,48,.89));
    box-shadow:0 16px 44px rgba(0,0,0,.20);
}

.owner-photo-column{
    display:flex;
    align-items:center;
    justify-content:center;
    min-width:0;
}

.owner-photo-frame{
    position:relative;
    width:148px;
    height:148px;
    padding:4px;
    border-radius:50%;
    background:linear-gradient(135deg,var(--profile-gold),#ffd576 30%,#b867ff 70%,#51dfff);
    box-shadow:0 0 22px rgba(69,164,255,.10);
}

.owner-photo-frame img,
.owner-photo-placeholder{
    width:100%;
    height:100%;
    border-radius:50%;
}

.owner-photo-frame img{
    display:block;
    object-fit:cover;
    background:#081425;
}

.owner-photo-placeholder{
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    background:radial-gradient(circle,#182a42,#071221);
    color:transparent;
    font-size:0;
}

.owner-photo-placeholder::before{
    content:"";
    width:54px;
    height:54px;
    border:1px solid rgba(237,185,71,.35);
    border-radius:50%;
    background:
        radial-gradient(circle at 50% 33%,rgba(237,185,71,.95) 0 6px,transparent 7px),
        radial-gradient(ellipse at 50% 72%,rgba(237,185,71,.75) 0 15px,transparent 16px);
    opacity:.75;
}

/* Hide the oversized decorative badge below the owner photo if present */
.owner-badge,
.owner-photo-badge,
.profile-owner-badge,
.owner-symbol,
.owner-avatar-badge{
    display:none!important;
}

.photo-button{
    position:absolute;
    right:-3px;
    bottom:8px;
    width:39px;
    height:39px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:2px solid #9f6aff;
    border-radius:50%;
    background:#07152b;
    color:#ffffff;
    font-size:18px;
    box-shadow:0 0 14px rgba(181,99,255,.32);
}

.owner-data-column{
    min-width:0;
}

.owner-data-column h2{
    margin:0 0 8px;
    color:#f4f6fa;
    font-size:22px;
    font-weight:500;
}

.owner-data-list{
    display:grid;
}

.owner-data-row{
    min-height:32px;
    display:grid;
    grid-template-columns:1fr minmax(180px,auto);
    gap:20px;
    align-items:center;
    border-bottom:1px solid rgba(130,164,209,.12);
}

.owner-data-row:last-child{
    border-bottom:0;
}

.owner-data-label{
    display:flex;
    align-items:center;
    gap:9px;
    color:#d4dae4;
    font-size:11px;
}

.owner-data-icon{
    width:21px;
    color:#e5eaf2;
    font-size:15px;
    text-align:center;
}

.owner-data-row strong{
    justify-self:end;
    color:#f0f3f7;
    font-size:10px;
    font-weight:500;
    text-align:right;
}

.account-active{
    min-width:76px;
    padding:6px 10px;
    border:1px solid rgba(41,211,157,.35);
    border-radius:5px;
    background:rgba(15,119,82,.18);
    color:#46e0aa!important;
    text-align:center!important;
}

/* QUICK ACTIONS */

.quick-actions-card{
    margin-top:8px;
    padding:12px 16px 14px;
    border:1px solid var(--profile-line);
    border-radius:14px;
    background:linear-gradient(135deg,rgba(4,16,37,.95),rgba(5,20,45,.89));
}

.quick-actions-heading h2{
    margin:0;
    color:#f4f6fa;
    font-size:18px;
    font-weight:500;
}

.quick-actions-heading p{
    margin:4px 0 0;
    color:var(--profile-muted);
    font-size:9px;
}

.quick-actions-grid{
    margin-top:11px;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
}

.quick-action{
    min-height:72px;
    padding:12px 15px;
    display:grid;
    grid-template-columns:46px 1fr 24px;
    gap:12px;
    align-items:center;
    border-radius:8px;
    background:rgba(6,18,38,.68);
    color:var(--profile-text);
    text-align:left;
}

.quick-action-gold{
    border:1px solid rgba(232,174,62,.43);
}

.quick-action-violet{
    border:1px solid rgba(185,93,255,.42);
}

.quick-action-icon{
    font-size:32px;
}

.quick-action-gold .quick-action-icon{
    color:#ffd12f;
}

.quick-action-violet .quick-action-icon{
    color:#d27cff;
}

.quick-action-text{
    display:grid;
    gap:4px;
}

.quick-action-text strong{
    font-size:13px;
    font-weight:500;
}

.quick-action-text span{
    color:var(--profile-muted);
    font-size:9px;
    line-height:1.35;
}

.quick-action-arrow{
    color:#eef3f8;
    font-size:22px;
}

/* MODALS — KEEP FUNCTIONALITY */

.profile-modal[hidden]{
    display:none;
}

.profile-modal{
    position:fixed;
    inset:0;
    z-index:1000;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px;
}

.profile-modal-backdrop{
    position:absolute;
    inset:0;
    background:rgba(0,4,14,.78);
    backdrop-filter:blur(8px);
}

.profile-modal-card{
    position:relative;
    z-index:2;
    width:min(520px,100%);
    max-height:calc(100vh - 48px);
    overflow-y:auto;
    padding:25px;
    border:1px solid rgba(134,178,239,.28);
    border-radius:14px;
    background:linear-gradient(145deg,#07152c,#040d1d);
    box-shadow:0 28px 100px rgba(0,0,0,.55);
}

.profile-modal-header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:20px;
    margin-bottom:20px;
}

.profile-modal-header small{
    color:var(--profile-gold);
    font-size:8px;
    font-weight:800;
    letter-spacing:.15em;
}

.profile-modal-header h2{
    margin:5px 0 0;
    font-size:24px;
}

.modal-close-button{
    width:35px;
    height:35px;
    border:1px solid rgba(143,190,255,.20);
    border-radius:6px;
    background:rgba(7,17,36,.65);
    color:#ffffff;
    font-size:24px;
}

#profile-form{
    display:grid;
    gap:13px;
}

#profile-form label{
    display:grid;
    gap:6px;
}

#profile-form label span{
    color:#8f9cad;
    font-size:10px;
}

#profile-form input{
    width:100%;
    min-height:43px;
    padding:0 13px;
    border:1px solid rgba(133,175,232,.20);
    border-radius:6px;
    outline:0;
    background:rgba(2,9,22,.75);
    color:#ffffff;
}

#profile-form input:focus{
    border-color:rgba(236,185,71,.65);
}

.profile-form-buttons{
    margin-top:8px;
    display:flex;
    justify-content:flex-end;
    gap:10px;
}

.modal-primary-button,
.modal-secondary-button{
    min-height:40px;
    padding:0 18px;
    border-radius:6px;
    font-size:10px;
    font-weight:700;
}

.modal-primary-button{
    border:1px solid #eab348;
    background:linear-gradient(180deg,#ffd776,#eaa12a);
    color:#241802;
}

.modal-secondary-button{
    border:1px solid rgba(143,190,255,.22);
    background:rgba(7,17,36,.72);
    color:#d7e0eb;
}

.settings-message{
    color:#a8b4c4;
    font-size:12px;
    line-height:1.6;
}

/* RESPONSIVE */

@media(max-width:1100px){
    .profile-owner-mini{
        display:none;
    }

    .profile-layout{
        grid-template-columns:170px minmax(0,1fr);
        gap:18px;
    }

    .owner-profile-card{
        grid-template-columns:160px minmax(0,1fr);
        gap:24px;
        padding:20px;
    }

    .owner-photo-frame{
        width:138px;
        height:138px;
    }
}

@media(max-width:820px){
    .profile-header{
        width:calc(100% - 28px);
    }

    .profile-top-nav a{
        padding:0 11px;
        font-size:9px;
    }

    .profile-layout{
        width:calc(100% - 28px);
        grid-template-columns:1fr;
    }

    .profile-sidebar-nav{
        grid-template-columns:repeat(5,1fr);
        overflow-x:auto;
    }

    .profile-sidebar-nav a{
        min-width:125px;
        justify-content:center;
    }

    .owner-profile-card{
        grid-template-columns:1fr;
    }

    .owner-data-column h2{
        text-align:center;
    }
}

@media(max-width:640px){
    .profile-brand span{
        font-size:16px;
    }

    .profile-brand-mark{
        width:35px;
        height:35px;
    }

    .profile-header{
        height:70px;
    }

    .profile-top-nav a:first-child{
        display:none;
    }

    .profile-title-block{
        min-height:82px;
        padding-left:0;
    }

    .profile-title-block h1{
        font-size:34px;
    }

    .owner-profile-card{
        padding:18px 14px;
    }

    .owner-data-row{
        grid-template-columns:1fr;
        gap:4px;
        padding:7px 0;
    }

    .owner-data-row strong{
        justify-self:start;
        text-align:left;
    }

    .quick-actions-grid{
        grid-template-columns:1fr;
    }

    .quick-action{
        grid-template-columns:42px 1fr 20px;
    }
}


/* =========================================================
   PROFILE v6 — FINAL PHOTO + QUICK ACTIONS FIX
   ========================================================= */

/* Photo container must never escape its 148px frame */
.owner-photo-column{
    position:relative;
    display:flex;
    align-items:center;
    justify-content:center;
    min-width:0;
    overflow:visible;
}

.owner-photo-frame{
    position:relative!important;
    width:148px!important;
    height:148px!important;
    min-width:148px!important;
    min-height:148px!important;
    max-width:148px!important;
    max-height:148px!important;
    padding:4px!important;
    overflow:visible!important;
    border-radius:50%!important;
}

.owner-photo-frame img[hidden]{
    display:none!important;
}

.owner-photo-placeholder{
    position:absolute!important;
    inset:4px!important;
    width:auto!important;
    height:auto!important;
    min-width:0!important;
    min-height:0!important;
    max-width:none!important;
    max-height:none!important;
    margin:0!important;
    padding:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:hidden!important;
    border-radius:50%!important;
    background:radial-gradient(circle at 50% 42%,#172b46 0%,#071221 72%)!important;
    color:var(--profile-gold)!important;
    font-size:0!important;
    transform:none!important;
}

.owner-photo-placeholder[hidden]{
    display:none!important;
}

.owner-photo-placeholder::before{
    display:none!important;
    content:none!important;
}

/* The diamond inside the placeholder is intentionally small */
.owner-placeholder-symbol{
    position:static!important;
    inset:auto!important;
    left:auto!important;
    right:auto!important;
    top:auto!important;
    bottom:auto!important;
    width:44px!important;
    height:44px!important;
    min-width:44px!important;
    min-height:44px!important;
    max-width:44px!important;
    max-height:44px!important;
    margin:0!important;
    padding:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:hidden!important;
    border:1px solid rgba(237,185,71,.34)!important;
    border-radius:50%!important;
    background:rgba(7,18,33,.72)!important;
    box-shadow:none!important;
    color:var(--profile-gold-light)!important;
    font-size:21px!important;
    line-height:1!important;
    transform:none!important;
}

.photo-button{
    position:absolute!important;
    right:-3px!important;
    bottom:8px!important;
    width:36px!important;
    height:36px!important;
    min-width:36px!important;
    min-height:36px!important;
    margin:0!important;
    padding:0!important;
    z-index:4!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    border:2px solid #9f6aff!important;
    border-radius:50%!important;
    background:#07152b!important;
    color:#fff!important;
    box-shadow:0 0 14px rgba(181,99,255,.32)!important;
    font-size:16px!important;
    line-height:1!important;
    transform:none!important;
}

/* Quick actions: hard reset browser/default/global button styles */
.profile-quick-actions-card{
    position:relative!important;
    z-index:1!important;
    margin-top:8px!important;
    padding:12px 16px 14px!important;
    overflow:hidden!important;
    border:1px solid var(--profile-line)!important;
    border-radius:14px!important;
    background:linear-gradient(135deg,rgba(4,16,37,.95),rgba(5,20,45,.89))!important;
}

.profile-quick-actions-heading h2{
    margin:0!important;
    color:#f4f6fa!important;
    font-size:17px!important;
    font-weight:500!important;
}

.profile-quick-actions-heading p{
    margin:3px 0 0!important;
    color:var(--profile-muted)!important;
    font-size:9px!important;
}

.profile-quick-actions-grid{
    margin-top:9px!important;
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:10px!important;
}

button.profile-quick-action{
    -webkit-appearance:none!important;
    appearance:none!important;
    position:relative!important;
    min-width:0!important;
    min-height:72px!important;
    margin:0!important;
    padding:10px 14px!important;
    display:grid!important;
    grid-template-columns:34px minmax(0,1fr) 22px!important;
    gap:10px!important;
    align-items:center!important;
    overflow:hidden!important;
    border-radius:8px!important;
    background:rgba(6,18,38,.88)!important;
    color:var(--profile-text)!important;
    text-align:left!important;
    box-shadow:none!important;
    transform:none!important;
}

button.profile-quick-action-gold{
    border:1px solid rgba(232,174,62,.55)!important;
}

button.profile-quick-action-violet{
    border:1px solid rgba(185,93,255,.52)!important;
}

.profile-quick-action-icon{
    position:static!important;
    width:30px!important;
    height:30px!important;
    min-width:30px!important;
    min-height:30px!important;
    margin:0!important;
    padding:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    border:0!important;
    border-radius:0!important;
    background:none!important;
    box-shadow:none!important;
    transform:none!important;
    font-size:22px!important;
    line-height:1!important;
}

.profile-quick-action-gold .profile-quick-action-icon{
    color:#ffd12f!important;
}

.profile-quick-action-violet .profile-quick-action-icon{
    color:#d27cff!important;
}

.profile-quick-action-text{
    min-width:0!important;
    display:grid!important;
    gap:3px!important;
}

.profile-quick-action-text strong{
    color:#f4f7fb!important;
    font-size:12px!important;
    font-weight:500!important;
}

.profile-quick-action-text span{
    color:var(--profile-muted)!important;
    font-size:8px!important;
    line-height:1.35!important;
}

.profile-quick-action-arrow{
    position:static!important;
    width:auto!important;
    height:auto!important;
    border:0!important;
    background:none!important;
    color:#eef3f8!important;
    font-size:20px!important;
    transform:none!important;
}

@media(max-width:1100px){
    .owner-photo-frame{
        width:138px!important;
        height:138px!important;
        min-width:138px!important;
        min-height:138px!important;
        max-width:138px!important;
        max-height:138px!important;
    }
}

@media(max-width:640px){
    .profile-quick-actions-grid{
        grid-template-columns:1fr!important;
    }

    button.profile-quick-action{
        grid-template-columns:34px minmax(0,1fr) 20px!important;
    }
}
