@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    color: #ffffff;
    font-family: 'DM Sans', sans-serif;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

body {
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(255,255,255,0.013) 2px,
            rgba(255,255,255,0.013) 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(255,255,255,0.008) 2px,
            rgba(255,255,255,0.008) 4px
        ),
        linear-gradient(180deg, #2D3037 0%, #1e2024 40%, #131518 100%);
    background-attachment: fixed;
}

/* ── TOPBAR ── */
.syb-topbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 900px;
    height: 65px;
    background: rgba(28, 29, 32, 0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px 0 28px;
    z-index: 100;
    box-shadow: 0 4px 32px rgba(0,0,0,0.3);
}

/* ── LOGO ── */
.syb-topbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.syb-logo-text {
    height: 26px;
    width: auto;
    display: block;
}

.syb-logo-icon {
    height: 30px;
    width: auto;
    display: block;
    animation: spinSlow 8s linear infinite;
}

@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ── NEW BUDGET BUTTON ── */
.syb-btn-new {
    background: rgba(255,255,255,0.95);
    color: #111;
    border: none;
    padding: 9px 22px;
    border-radius: 100px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.syb-btn-new:hover {
    background: #ffffff;
    transform: scale(1.02);
}

/* ── MAIN CONTENT ── */
.syb-content {
    max-width: 1240px;
    margin: 0 auto;
    padding: 120px 24px 60px;
}

/* ── PAGE TITLE ── */
.syb-page-header {
    text-align: center;
    margin-bottom: 48px;
    margin-top: 16px;
}

.syb-page-title {
    font-size: 42px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 10px;
}

.syb-page-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.4);
    font-weight: 400;
}

/* ── CENTERED BLOCK 1100px ── */
.syb-center-block {
    width: 1100px;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* ── 4 CARDS ── */
.syb-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 40px;
}

.syb-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 0 22px;
    height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: border-color 0.2s;
}

.syb-card:hover {
    border-color: rgba(255,255,255,0.12);
}

.syb-card-label {
    font-size: 10px;
    font-weight: 500;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 5px;
}

.syb-card-value {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.8px;
    line-height: 1;
}

.syb-card-value.ciano { color: #4DD9D5; }
.syb-card-value.azul  { color: #7C83FF; }
.syb-card-value.verde { color: #6ee7b7; }

.syb-card-sub {
    font-size: 10px;
    color: rgba(255,255,255,0.2);
    margin-top: 4px;
}

/* ── SECTION LABEL ── */
.syb-section-label {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 14px;
    display: block;
}

/* ── CATEGORIA BUTTONS ── */
.syb-categories {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.syb-cat-btn {
    flex: 1;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 110px;
    color: rgba(255,255,255,0.4);
}

.syb-cat-btn:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.7);
}

.syb-cat-btn.active {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.3);
    color: #ffffff;
}

.syb-cat-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
}

.syb-cat-icon svg {
    width: 28px;
    height: 28px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.syb-cat-label {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.3px;
    color: inherit;
}

/* ── DROPDOWN OVERLAY ── */
.syb-dropdown-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
}

.syb-dropdown-overlay.open {
    display: block;
}

/* ── DROPDOWN MENU ── */
.syb-dropdown {
    position: absolute;
    background: #252525;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 8px;
    min-width: 300px;
    max-height: 340px;
    overflow-y: auto;
    z-index: 300;
    display: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.syb-dropdown.open {
    display: block;
    animation: dropIn 0.15s ease;
}

@keyframes dropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.syb-dropdown::-webkit-scrollbar { width: 4px; }
.syb-dropdown::-webkit-scrollbar-track { background: transparent; }
.syb-dropdown::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

.syb-dropdown-item {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 400;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.syb-dropdown-item:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.syb-dropdown-item-credits {
    font-size: 11px;
    font-family: 'DM Mono', monospace;
    color: rgba(255,255,255,0.3);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── ITENS ADICIONADOS ── */
.syb-items-section {
    margin-top: 24px;
}

.syb-items-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.syb-item-row {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: border-color 0.2s;
    animation: slideIn 0.2s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.syb-item-row:hover {
    border-color: rgba(255,255,255,0.12);
}

.syb-item-cat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    flex-shrink: 0;
}

.syb-item-cat-dot.image { background: #4DD9D5; }
.syb-item-cat-dot.video { background: #7C83FF; }
.syb-item-cat-dot.audio { background: #f59e0b; }
.syb-item-cat-dot.edit  { background: #6ee7b7; }

.syb-item-name {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    flex: 1;
}

.syb-item-credits {
    font-size: 12px;
    font-family: 'DM Mono', monospace;
    color: #4DD9D5;
    min-width: 70px;
    text-align: right;
}

.syb-item-cost {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    min-width: 80px;
    text-align: right;
}

.syb-item-remove {
    background: none;
    border: none;
    color: rgba(255,255,255,0.2);
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.syb-item-remove:hover {
    color: #ff6b6b;
}

.syb-item-qty-ctrl {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 4px 10px;
}

.syb-item-qty-ctrl button {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    font-size: 16px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
    line-height: 1;
}

.syb-item-qty-ctrl button:hover { color: #fff; }

.syb-item-qty-num {
    font-size: 13px;
    font-family: 'DM Mono', monospace;
    color: rgba(255,255,255,0.8);
    min-width: 20px;
    text-align: center;
}

/* ── SAVE SECTION ── */
.syb-save-section {
    display: flex;
    justify-content: center;
    margin-top: 24px;
    padding-top: 24px;
}

.syb-save-card-btn {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 0 48px;
    height: 90px;
    min-width: 340px;
    color: rgba(255,255,255,0.5);
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.syb-save-card-btn:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.18);
    color: #ffffff;
}
.syb-empty {
    text-align: center;
    padding: 48px 0;
    color: rgba(255,255,255,0.15);
    font-size: 14px;
}

/* ── MODAL ── */
.syb-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
}

.syb-modal-overlay.open {
    display: flex;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.syb-modal {
    background: #222;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 36px;
    width: 100%;
    max-width: 440px;
    position: relative;
    animation: scaleIn 0.2s ease;
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}

.syb-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
    margin-bottom: 28px;
}

.syb-modal-field { margin-bottom: 16px; }

.syb-modal-field label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 8px;
}

.syb-modal-field input {
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 12px 14px;
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.syb-modal-field input:focus { border-color: rgba(255,255,255,0.3); }
.syb-modal-field input::placeholder { color: rgba(255,255,255,0.2); }

.syb-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 28px;
    justify-content: flex-end;
}

.syb-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: rgba(255,255,255,0.06);
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 16px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.syb-modal-close:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.syb-btn-cancel {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.5);
    padding: 10px 20px;
    border-radius: 100px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.syb-btn-cancel:hover {
    border-color: rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.8);
}

.syb-btn-save {
    background: #ffffff;
    color: #111;
    border: none;
    padding: 10px 22px;
    border-radius: 100px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.syb-btn-save:hover {
    background: #f0f0f0;
    transform: scale(1.02);
}

/* ── TOAST ── */
.syb-toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    background: #222;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 14px 20px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    z-index: 9999;
    display: none;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

/* ── RESPONSIVE ── */
@media (max-width: 1140px) {
    .syb-center-block { width: 100%; }
}

@media (max-width: 900px) {
    .syb-cards { grid-template-columns: repeat(2, 1fr); }
    .syb-page-title { font-size: 28px; }
    .syb-categories { flex-wrap: wrap; }
    .syb-cat-btn { flex: none; width: calc(33% - 7px); }
    .syb-topbar { padding: 0 20px; }
}

@media (max-width: 600px) {
    .syb-cards { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .syb-card { height: auto; padding: 14px 16px; }
    .syb-card-value { font-size: 20px; }

    .syb-categories { flex-wrap: wrap; gap: 8px; }
    .syb-cat-btn { flex: none; width: calc(33.333% - 6px); height: 90px; }
    .syb-cat-icon svg { width: 22px; height: 22px; }
    .syb-cat-label { font-size: 11px; }

    /* Item row — 2 linhas no mobile */
    .syb-item-row {
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px 14px;
    }

    .syb-item-cat-dot {
        margin-top: 2px;
    }

    .syb-item-name {
        flex: 1;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Remove botão da primeira linha, vai para a segunda */
    .syb-item-remove {
        order: 2;
        margin-left: auto;
    }

    /* Segunda linha: qty + credits + cost */
    .syb-item-qty-ctrl {
        order: 3;
        width: 100%;
        margin-left: 16px; /* alinha com o nome */
    }

    .syb-item-credits {
        order: 4;
        flex: 1;
        text-align: left;
        margin-left: 0;
        min-width: auto;
    }

    .syb-item-cost {
        order: 5;
        min-width: auto;
        text-align: right;
    }

    /* Força segunda linha para qty/credits/cost */
    .syb-item-row::after {
        content: '';
        width: 100%;
        order: 2;
        height: 0;
    }

    .syb-save-card-btn {
        min-width: 0;
        width: 100%;
        height: 70px;
        font-size: 14px;
    }

    .syb-page-title { font-size: 24px; }
    .syb-content { padding: 100px 16px 40px; }
}
