/* ============================================================
   TOWER OMEGA — ŞİRKET & PATRON GELİŞTİRMELERİ + RESTORASYON CSS
   ============================================================ */

/* Şirket Modalı */
.cm-company-inner {
    max-width: 440px;
    width: 92%;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    padding: 18px 20px 16px;
    background: linear-gradient(175deg, #182333 0%, #0d141e 100%);
    border: 1px solid rgba(243, 181, 58, 0.28);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    color: #f0f4f8;
    overflow: hidden;
}

.cm-company-stats-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 14px;
    border-radius: 12px;
    margin: 10px 0 14px;
    gap: 10px;
}

.cm-csh-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cm-csh-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid #f3b53a;
    background: rgba(243, 181, 58, 0.12);
}

.cm-csh-info {
    display: flex;
    flex-direction: column;
}

.cm-csh-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.3px;
}

.cm-csh-subtitle {
    font-size: 11px;
    color: #f3b53a;
    font-weight: 600;
}

.cm-csh-pills {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.cm-csh-pill {
    font-size: 11px;
    background: rgba(0, 0, 0, 0.35);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
}

.cm-csh-pill b {
    color: #38bdf8;
    font-weight: 700;
}

/* Sekmeler */
.cm-company-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.cm-company-tab {
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.18s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cm-company-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
}

.cm-company-tab.active {
    background: linear-gradient(135deg, rgba(243, 181, 58, 0.22) 0%, rgba(243, 181, 58, 0.08) 100%);
    border-color: #f3b53a;
    color: #fef08a;
    box-shadow: 0 2px 8px rgba(243, 181, 58, 0.15);
}

/* Geliştirme Listesi */
.cm-company-upgrades-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    max-height: 48vh;
    padding-right: 4px;
    margin-bottom: 12px;
}

.cm-company-upgrades-list::-webkit-scrollbar {
    width: 5px;
}

.cm-company-upgrades-list::-webkit-scrollbar-thumb {
    background: rgba(243, 181, 58, 0.3);
    border-radius: 4px;
}

/* Yükseltme Kartı */
.cm-upgrade-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    padding: 12px;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cm-upgrade-card:hover {
    border-color: rgba(243, 181, 58, 0.35);
    background: rgba(255, 255, 255, 0.05);
}

.cm-upgrade-card.is-max {
    border-color: rgba(74, 222, 128, 0.4);
    background: rgba(74, 222, 128, 0.03);
}

.cm-uc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cm-uc-left {
    display: flex;
    align-items: center;
    gap: 9px;
}

.cm-uc-icon {
    font-size: 20px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.cm-uc-titles {
    display: flex;
    flex-direction: column;
}

.cm-uc-name {
    font-size: 13px;
    font-weight: 700;
    color: #f8fafc;
}

.cm-uc-sub {
    font-size: 11px;
    color: #94a3b8;
}

.cm-uc-level-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(243, 181, 58, 0.15);
    color: #f3b53a;
    border: 1px solid rgba(243, 181, 58, 0.3);
}

.cm-upgrade-card.is-max .cm-uc-level-badge {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.3);
}

/* Seviye Çubukları */
.cm-uc-steps {
    display: flex;
    gap: 5px;
    margin: 2px 0;
}

.cm-uc-step {
    flex: 1;
    height: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.cm-uc-step.filled {
    background: linear-gradient(90deg, #f3b53a, #facc15);
    box-shadow: 0 0 6px rgba(243, 181, 58, 0.4);
}

.cm-upgrade-card.is-max .cm-uc-step.filled {
    background: linear-gradient(90deg, #4ade80, #22c55e);
    box-shadow: 0 0 6px rgba(74, 222, 128, 0.4);
}

/* Perk Açıklaması */
.cm-uc-perk {
    font-size: 11px;
    color: #cbd5e1;
    line-height: 1.4;
    background: rgba(0, 0, 0, 0.25);
    padding: 6px 9px;
    border-radius: 7px;
    border-left: 3px solid #f3b53a;
}

.cm-upgrade-card.is-max .cm-uc-perk {
    border-left-color: #4ade80;
}

.cm-uc-next-perk {
    font-size: 10.5px;
    color: #38bdf8;
    margin-top: 1px;
}

/* Buton Satırı */
.cm-uc-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 2px;
}

.cm-uc-buy-btn {
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    border: none;
    transition: all 0.16s ease;
    background: linear-gradient(135deg, #f3b53a 0%, #d97706 100%);
    color: #1a1003;
    box-shadow: 0 2px 8px rgba(243, 181, 58, 0.25);
}

.cm-uc-buy-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(243, 181, 58, 0.4);
    filter: brightness(1.08);
}

.cm-uc-buy-btn:disabled {
    background: rgba(255, 255, 255, 0.08);
    color: #64748b;
    cursor: not-allowed;
    box-shadow: none;
}

.cm-uc-max-tag {
    font-size: 12px;
    font-weight: 700;
    color: #4ade80;
    padding: 4px 10px;
}

/* Geri Alım Karar Modalı */
.cm-buyback-action-inner {
    width: 344px;
    max-width: 94%;
    padding: 13px 15px 15px;
    max-height: 90%;
    overflow-y: auto;
}

.cm-bba-desc {
    font-size: 11.5px;
    color: #cbd5e1;
    margin: 2px 0 4px;
    line-height: 1.45;
}

.cm-bba-choices {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 2px;
}

.cm-bba-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.09);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.cm-bba-row:hover {
    border-color: rgba(243, 181, 58, 0.45);
    background: rgba(243, 181, 58, 0.06);
    transform: translateY(-1px);
}

.cm-bba-row:active { transform: translateY(0); }

.cm-bba-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 17px;
}

.cm-bba-copy {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.cm-bba-copy b {
    font-size: 11.5px;
    font-weight: 900;
    color: #fff;
}

.cm-bba-copy small {
    font-size: 9px;
    line-height: 1.35;
    color: #94a3b8;
}

.cm-bba-restore-meta {
    font-size: 9px;
    font-style: normal;
    font-weight: 800;
    color: #54d9c9;
}

.cm-bba-restore-meta.is-warning { color: #f87171; }

.cm-bba-cta {
    flex-shrink: 0;
    padding: 6px 8px;
    border-radius: 7px;
    font-size: 7.5px;
    font-weight: 900;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #241704;
    background: linear-gradient(180deg, #ffd97a, #e2a027);
    white-space: nowrap;
}

.cm-bba-cta.is-ghost {
    color: #cfdaea;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cm-bba-row.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.cm-bba-row.is-disabled:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.035);
}

/* Restorasyon Mini-Oyunu Overlay */
.restoration-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.22s ease-out;
}

.restoration-panel {
    width: 90%;
    max-width: 360px;
    background: linear-gradient(180deg, #16202e 0%, #0c121b 100%);
    border: 1px solid rgba(243, 181, 58, 0.35);
    border-radius: 18px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
    box-sizing: border-box;
}

.restoration-header {
    width: 100%;
    margin-bottom: 10px;
}

.restoration-desc {
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
    margin-top: 4px;
}

.restoration-canvas-wrap {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    overflow: hidden;
    background: radial-gradient(circle at 50% 35%, #4a3018, #241509 72%);
    position: relative;
    box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.6);
}

.restoration-canvas-wrap canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

.restoration-timer-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    margin: 10px 0 6px;
}

.restoration-timer-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    transition: width 0.1s linear;
}

.restoration-stats {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 10px;
    width: 100%;
    font-size: 12px;
    color: #cbd5e1;
    font-weight: 600;
    margin-bottom: 10px;
}

.restoration-stats b {
    color: #f3b53a;
}

.restoration-stats #restoration-score-text.is-pass { color: #4ade80; }
.restoration-stats #restoration-score-text.is-fail { color: #f87171; }

.restoration-panel.is-success {
    border-color: rgba(74, 222, 128, 0.55);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7), 0 0 34px rgba(74, 222, 128, 0.18);
}

.restoration-panel.is-fail {
    border-color: rgba(248, 113, 113, 0.55);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7), 0 0 34px rgba(248, 113, 113, 0.18);
}

/* ============================================================
   ELMAS / PREMIUM
   ============================================================ */

.cm-csh-premium {
    border-color: rgba(139, 92, 246, 0.4);
    background: rgba(139, 92, 246, 0.12);
}

.cm-csh-premium b { color: #c4b5fd; }

.cm-upgrade-card.is-premium {
    border-color: rgba(139, 92, 246, 0.35);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.09), rgba(255, 255, 255, 0.02));
}

.cm-upgrade-card.is-premium:hover {
    border-color: rgba(167, 139, 250, 0.55);
}

.cm-uc-step.is-premium-step {
    background: rgba(139, 92, 246, 0.22);
    box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.25);
}

.cm-uc-step.is-premium-step.filled {
    background: linear-gradient(90deg, #a78bfa, #7c3aed);
    box-shadow: 0 0 6px rgba(139, 92, 246, 0.5);
}

.cm-uc-buy-btn.is-premium {
    background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);
    color: #f5f3ff;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.35);
}

.cm-uc-buy-btn.is-premium:hover:not(:disabled) {
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.5);
    filter: brightness(1.08);
}

/* ============================================================
   MALZEME MAĞAZASI İÇİNDEKİ GELİŞTİRMELER
   ============================================================ */

.cm-material-upgrades {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--cm-line);
}

.cm-material-upgrades-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 7px;
}

.cm-material-upgrades-head span {
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--cm-gold);
}

.cm-material-upgrades-head small {
    font-size: 8.5px;
    font-weight: 600;
    color: var(--cm-muted);
}

.cm-company-upgrades-list.is-compact {
    max-height: none;
    overflow: visible;
    padding-right: 0;
    margin-bottom: 0;
}

.cm-upgrade-card.is-compact {
    padding: 9px 10px;
    gap: 6px;
}

.cm-upgrade-card.is-compact .cm-uc-icon {
    width: 26px;
    height: 26px;
    font-size: 15px;
}

.cm-upgrade-card.is-compact .cm-uc-name { font-size: 11.5px; }
.cm-upgrade-card.is-compact .cm-uc-sub { font-size: 10px; }
.cm-upgrade-card.is-compact .cm-uc-perk { font-size: 10px; padding: 5px 8px; }
.cm-upgrade-card.is-compact .cm-uc-next-perk { font-size: 9.5px; }
.cm-upgrade-card.is-compact .cm-uc-buy-btn { padding: 6px 11px; font-size: 11px; }
.cm-upgrade-card.is-compact .cm-uc-steps { margin: 0; }

/* ============================================================
   ELMAS MAĞAZASI
   ============================================================ */

#cm-store-modal { z-index: 28; }

.cm-store-inner {
    width: 372px;
    max-width: 94%;
    border-color: rgba(139, 92, 246, 0.35);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.66),
        0 0 44px rgba(124, 58, 237, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.cm-store-note {
    margin: 0;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--cm-muted);
}

.cm-store-balance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 11px;
    border-radius: 9px;
    background: var(--cm-panel);
    border: 1px solid var(--cm-line);
    font-size: 10px;
    font-weight: 700;
    color: var(--cm-muted);
}

.cm-store-balance b {
    font-size: 13px;
    color: #c4b5fd;
}

.cm-store-packs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.cm-store-pack {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 11px 10px;
    border-radius: 12px;
    background: linear-gradient(160deg, rgba(139, 92, 246, 0.12), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(139, 92, 246, 0.28);
}

.cm-store-gems {
    font-size: 15px;
    font-weight: 900;
    color: #ded6ff;
}

.cm-store-pack-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #a78bfa;
}

.cm-store-price {
    font-size: 11px;
    font-weight: 800;
    color: var(--cm-text);
}

.btn.cm-store-buy {
    margin-top: 3px;
    width: 100%;
    padding: 6px 8px;
    font-size: 10px;
}

.cm-store-feedback {
    font-size: 10px;
    font-weight: 700;
    line-height: 1.45;
    padding: 7px 10px;
    border-radius: 8px;
    color: #9fe7de;
    background: rgba(84, 217, 201, 0.08);
    border: 1px solid rgba(84, 217, 201, 0.22);
}
