/* ============================
   license.broker - Neomorphism Soft UI
   ============================ */

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.7;
    color: #7A7268;
    background: #E8E4DF;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Typography */
h2, .card-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: #5A5348;
    letter-spacing: -0.01em;
}

.mono {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 13px;
    color: #5A5348;
}

/* ============================
   Neomorphic Utilities
   ============================ */

.neo-card {
    background: #E8E4DF;
    border-radius: 20px;
    border: none;
    box-shadow: 8px 8px 16px rgba(0, 0, 0, 0.08), -8px -8px 16px rgba(255, 255, 255, 0.9);
    transition: box-shadow 300ms ease;
}

.neo-card:hover {
    box-shadow: 12px 12px 24px rgba(0, 0, 0, 0.1), -12px -12px 24px rgba(255, 255, 255, 0.95);
}

.neo-inset {
    background: #E8E4DF;
    border-radius: 12px;
    border: none;
    box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.08), inset -2px -2px 5px rgba(255, 255, 255, 0.8);
}

.neo-inset-sm {
    background: #E8E4DF;
    border-radius: 8px;
    border: none;
    box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.08), inset -1px -1px 3px rgba(255, 255, 255, 0.8);
}

.neo-btn {
    background: #E8E4DF;
    border: none;
    border-radius: 14px;
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.08), -4px -4px 8px rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: box-shadow 150ms ease-out, transform 150ms ease-out;
    outline: none;
}

.neo-btn:active,
.neo-btn.pressed {
    box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.08), inset -3px -3px 6px rgba(255, 255, 255, 0.9);
    transform: scale(0.98);
}

.neo-btn-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #E8E4DF;
    border: none;
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.08), -4px -4px 8px rgba(255, 255, 255, 0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 150ms ease-out, transform 150ms ease-out;
    outline: none;
}

.neo-btn-circle:active,
.neo-btn-circle.pressed {
    box-shadow: inset 3px 3px 6px rgba(0, 0, 0, 0.08), inset -3px -3px 6px rgba(255, 255, 255, 0.9);
    transform: scale(0.98);
}

/* ============================
   Control Strip
   ============================ */

#control-strip {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: #E8E4DF;
}

#site-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 22px;
    color: #5A5348;
    letter-spacing: -0.01em;
    text-shadow: none;
    padding: 6px 16px;
    border-radius: 12px;
    box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.08), inset -2px -2px 5px rgba(255, 255, 255, 0.8);
}

#strip-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ============================
   Search Overlay
   ============================ */

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: #E8E4DF;
    z-index: 200;
    display: flex;
    align-items: center;
    padding: 0 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: opacity 200ms ease, transform 200ms ease;
}

.search-overlay.hidden {
    opacity: 0;
    transform: translateY(-100%);
    pointer-events: none;
}

.search-container {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.search-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    position: relative;
}

.search-input-wrap input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    color: #5A5348;
    line-height: 1.7;
}

.search-input-wrap input::placeholder {
    color: #7A7268;
    opacity: 0.6;
}

.search-accent-line {
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background: #C17F59;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 300ms ease;
}

.search-input-wrap input:focus ~ .search-accent-line {
    transform: scaleX(1);
}

/* ============================
   Bento Grid
   ============================ */

#bento-grid {
    display: grid;
    grid-template-areas:
        "a a b"
        "a a c"
        "d e c";
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 20px;
    padding: 20px 24px 40px;
    max-width: 1200px;
    margin: 0 auto;
    opacity: 0;
}

#bento-grid.visible {
    opacity: 1;
}

#panel-a { grid-area: a; }
#panel-b { grid-area: b; }
#panel-c { grid-area: c; }
#panel-d { grid-area: d; }
#panel-e { grid-area: e; }

.bento-card {
    padding: 24px;
    position: relative;
    overflow: hidden;
}

/* ============================
   Panel A: License Explorer
   ============================ */

#panel-a {
    min-height: 420px;
}

.panel-a-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 40% 40%, rgba(193, 127, 89, 0.03), transparent 70%);
    pointer-events: none;
}

#panel-a .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

#panel-a .card-title {
    font-size: 24px;
}

.filter-pills {
    display: flex;
    gap: 8px;
}

.neo-pill {
    background: #E8E4DF;
    border: none;
    border-radius: 20px;
    padding: 6px 14px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #7A7268;
    cursor: pointer;
    box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.07), -3px -3px 6px rgba(255, 255, 255, 0.85);
    transition: box-shadow 150ms ease-out, color 150ms ease, transform 150ms ease-out;
    outline: none;
}

.neo-pill:active {
    transform: scale(0.98);
}

.neo-pill.active {
    box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.08), inset -2px -2px 4px rgba(255, 255, 255, 0.8);
    color: #C17F59;
    font-weight: 600;
}

.license-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.license-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #E8E4DF;
    box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.05), inset -2px -2px 5px rgba(255, 255, 255, 0.7);
    transition: box-shadow 200ms ease, opacity 300ms ease;
}

.license-item.filtered-out {
    display: none;
}

.license-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #E8E4DF;
    box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.07), -3px -3px 6px rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.license-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.license-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 15px;
    color: #5A5348;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.license-key {
    font-size: 12px;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.license-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}

.license-status {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.license-price {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 400;
    color: #5A5348;
}

/* Status Dots */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.status-dot.active {
    background: #7BAF8E;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.06), -2px -2px 4px rgba(255, 255, 255, 0.8);
}

.status-dot.expiring {
    background: #C17F59;
    animation: pulse-dot 2s ease-in-out infinite;
}

.status-dot.expired {
    background: #7A7268;
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.1), inset -1px -1px 2px rgba(255, 255, 255, 0.5);
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Progress Rings */
.license-progress-wrap {
    position: relative;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
}

.progress-track {
    stroke: #E8E4DF;
    filter: url(#inset-shadow);
    box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.08);
    stroke: rgba(0, 0, 0, 0.05);
}

.progress-arc {
    transition: stroke-dashoffset 800ms ease-out;
}

.progress-arc.software-color {
    stroke: #C17F59;
}

.progress-arc.enterprise-color {
    stroke: #6B8FB5;
}

.progress-arc.education-color {
    stroke: #7BAF8E;
}

.progress-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 400;
    color: #5A5348;
    position: relative;
    z-index: 1;
}

/* ============================
   Panel B: Recent Activity
   ============================ */

#panel-b .card-title {
    font-size: 20px;
    margin-bottom: 16px;
}

.activity-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.activity-label {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #5A5348;
}

.activity-detail {
    font-size: 13px;
    color: #7A7268;
    line-height: 1.5;
}

.activity-time {
    font-size: 11px;
    opacity: 0.6;
    flex-shrink: 0;
    padding-top: 2px;
}

/* ============================
   Panel C: Categories
   ============================ */

#panel-c .card-title {
    font-size: 20px;
    margin-bottom: 16px;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    width: 100%;
    text-align: left;
    font-family: 'Outfit', sans-serif;
}

.category-badge {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #E8E4DF;
    box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.07), -3px -3px 6px rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.category-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.category-name {
    font-weight: 600;
    font-size: 15px;
    color: #5A5348;
}

.category-count {
    font-size: 12px;
    opacity: 0.7;
}

.category-arrow {
    flex-shrink: 0;
    opacity: 0.5;
    transition: transform 200ms ease, opacity 200ms ease;
}

.category-item:hover .category-arrow {
    transform: translateX(3px);
    opacity: 0.8;
}

/* ============================
   Panel D: License Count
   ============================ */

#panel-d .card-title {
    font-size: 18px;
    margin-bottom: 12px;
}

.stat-display {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stat-number {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 48px;
    color: #5A5348;
    letter-spacing: -0.02em;
    line-height: 1;
}

.stat-detail {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-label {
    font-size: 13px;
    color: #7A7268;
    flex: 1;
}

.stat-value {
    font-size: 13px;
}

/* ============================
   Panel E: Market Stats
   ============================ */

#panel-e .card-title {
    font-size: 18px;
    margin-bottom: 12px;
}

.market-stats {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.market-stat-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.market-stat-label {
    font-size: 13px;
    color: #7A7268;
}

.market-stat-bar-wrap {
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.market-stat-bar {
    height: 100%;
    border-radius: 5px;
    background: #C17F59;
    transition: width 800ms ease-out;
}

.market-stat-bar.renewal {
    background: #7BAF8E;
}

.market-stat-bar.utilization {
    background: #6B8FB5;
}

.market-stat-value {
    font-size: 12px;
    opacity: 0.8;
}

/* ============================
   Responsive
   ============================ */

@media (max-width: 900px) {
    #bento-grid {
        grid-template-areas:
            "a a"
            "b c"
            "d e";
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
    }
}

@media (max-width: 600px) {
    #bento-grid {
        grid-template-areas:
            "a"
            "b"
            "c"
            "d"
            "e";
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        padding: 12px 16px 32px;
    }

    #control-strip {
        padding: 0 16px;
    }

    #site-name {
        font-size: 18px;
    }

    .filter-pills {
        flex-wrap: wrap;
    }

    .license-item {
        flex-wrap: wrap;
    }

    .license-progress-wrap {
        margin-left: auto;
    }
}
