:root {
    --primary: #f72549;
    --primary-hover: #d61f3e;
    --bg-main: #000000;
    --bg-header: #222222;
    --bg-card: #111111;
    --bg-input: #000000;
    --text-main: #ffffff;
    --text-muted: #5c5c5c;
    --border: #444444;
    --points: #333333;
    --accent-success: #10b981;
    --accent-purple: #8b5cf6;
    --accent-danger: #ef4444;
}

/* Helpers */
.hidden { display: none !important; }

/* Loading Screen Premium */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
}

.loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-logo {
    font-size: 2.5rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 2rem;
    letter-spacing: 0.1em;
    animation: pulse 2s infinite ease-in-out;
}

.loader-logo span {
    color: var(--primary);
}

.loader-bar-container {
    width: 200px;
    height: 4px;
    background: #111;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.loader-bar {
    width: 100%;
    height: 100%;
    background: var(--primary);
    position: absolute;
    left: -100%;
    animation: loader-anim 1.5s infinite cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 15px var(--primary);
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.98); }
}

@keyframes loader-anim {
    0% { left: -100%; }
    50% { left: 0; }
    100% { left: 100%; }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--border) var(--bg-main);
}

input, select, textarea {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    background: var(--bg-main);
    color: var(--text-main);
    letter-spacing: 0;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Top Bar (Header) */
.top-bar {
    height: 80px;
    background: var(--bg-header);
    border-bottom: 1px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4%;
    flex-shrink: 0;
    z-index: 1000;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

.header-logo h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-main);
}

.header-logo h2 span {
    color: var(--primary);
}

.header-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.header-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1rem;
}

.header-nav li {
    cursor: pointer;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

.header-nav li a {
    color: inherit;
    text-decoration: none;
    padding: 0.5rem 1.5rem;
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    border-radius: inherit;
}

.header-nav li:hover {
    color: white;
}

.header-nav li.active {
    color: white;
    /*background: rgba(255, 255, 255, 0.05);*/
}

.btn-logout-header {
    background: transparent;
    border: 3px solid var(--primary);
    color: var(--primary);
    padding: 0.4rem 1.25rem;
    border-radius: 50vh;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.btn-logout-header:hover {
    background: var(--primary);
    color: #000;
}

/* User Dropdown */
.user-menu-container {
    position: relative;
    display: inline-block;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    min-width: 150px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    margin-top: 0.5rem;
    display: none;
}

.user-dropdown.show {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.user-dropdown ul {
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
}

.user-dropdown li a, .user-dropdown li button {
    display: block;
    padding: 0.6rem 1.2rem;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.user-dropdown li a:hover, .user-dropdown li button:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary);
}

/* Content Area */
.content {
    flex: 1;
    padding: 2.5rem 4%;
    padding-top: calc(80px + 2.5rem);
    overflow-y: auto;
    width: 100%;
    box-sizing: border-box;
}

.page {
    display: none;
    margin: 0;
    position: relative;
}

.page.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

.page.full-screen {
    height: 100vh;
    width: 100%;
    align-items: center;
    justify-content: center;
}

.page.full-screen.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

h1 {
    margin-top: 0;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

h1 span {
    color: var(--primary);
}

.text-muted {
    color: var(--text-muted)
}

/* Card Style (Matched to sectionBox) */
.card {
    background: var(--bg-card);
    border-radius: 0px;
    padding: 2rem;
    border: 2px solid var(--border);
    margin-bottom: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}

.card h2, .card h3 {
    margin-top: 0;
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1.5rem;
    min-height: 40px;
}

.card-header h1,
.card-header h2,
.card-header h3 {
    margin: 0 !important;
    line-height: 1.2;
}

.btn-icon {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    width: 36px;
    height: 36px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s, background 0.2s;
    padding: 0;
    font-size: 1.5rem;
}

.btn-icon:hover {
    background: var(--primary);
    color: black;
    box-shadow: 0 0 5px var(--primary);
}

.btn-icon svg {
    display: block;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

input, select, textarea {
    width: 100%;
    height: 52px;
    padding: 0 1.2rem;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: 5px;
    font-size: 1rem;
    color: white;
    transition: border-color 0.2s;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

textarea {
    height: auto;
    padding: 1.2rem;
    resize: vertical;
    min-height: 120px;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Remove arrows from number inputs */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.time-inputs {
    display: flex;
    gap: 0.5rem;
}

.time-inputs input {
    padding: 0.8rem 0.5rem;
    text-align: center;
}

/* Dashboard Calculator Layout */
.calc-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    align-items: start;
}

.results-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-card {
    margin-bottom: 0;
    padding: 1.5rem;
    border: 2px solid var(--border);
}

.result-card.retail {
    border-color: var(--border);
}

.breakdown-card {
    border-color: var(--border);
}

.result-header span {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.result-header strong {
    font-size: 2.2rem;
    color: white;
    display: block;
    font-weight: 800;
}

.result-header .percentage-badge {
    color: var(--primary);
    font-weight: 700;
}

.breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.breakdown-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.breakdown-item strong {
    color: var(--primary);
    font-weight: 600;
    flex-shrink: 0;
}

.breakdown-total strong {
    color: var(--primary);
    font-size: 1.5rem;
}

/* Botões */
.btn-primary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    height: 52px;
    padding: 0 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.2s;
    font-size: 1rem;
}

.btn-primary:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0px 0px 15px var(--primary);
    cursor: pointer;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

.btn-primary:disabled:hover {
    background: transparent !important;
    color: var(--primary) !important;
    box-shadow: none !important;
}

.btn-danger {
    background: transparent;
    color: var(--accent-danger);
    border: 3px solid var(--accent-danger);
    padding: 0.8rem 2rem;
    border-radius: 50vh;
    cursor: pointer;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.btn-danger:hover {
    background: var(--accent-danger);
    color: #000;
    box-shadow: 0px 0px 15px var(--accent-danger);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-main);
    height: 52px;
    padding: 0 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 1rem;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--text-main);
}

.btn-secondary.danger {
    color: var(--primary);
    border-color: rgba(239, 68, 68, 0.5);
}

.btn-secondary.danger:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.btn-secondary.btn-icon-only {
    padding: 0;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
}

/* Catalog */
.catalog-item-card {
    background: var(--bg-card);
    border-radius: 20px;
    border: 2px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s;
}

.catalog-item-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    border-color: var(--primary);
}

.catalog-item-name {
    text-transform: uppercase;
    font-weight: 800;
    color: var(--text-main);
}

/* Login Page Override */
.plg {
    background: var(--bg-main) !important;
}

.plg .card {
    border: 3px solid var(--primary);
    box-shadow: 0 0 20px rgba(247, 37, 73, 0.1);
}

.plg h2 {
    color: white;
    font-weight: 800;
    text-transform: uppercase;
}

.plg h2 span {
    color: var(--primary);
}

/* Additional specific adjustments for layout consistency with BSO Master */
.interface {
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
}

.breakdown-item::after {
    color: var(--points);
}

.percentage-badge {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 1px;
}

/* Profile specific */
.custom-fields-section {
    margin-top: 2rem;
    padding: 2rem;
    background: #080808;
    border: 1px solid var(--border);
    border-radius: 5px;
}

.custom-fields-section h4 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    font-size: 1rem;
    color: var(--text-main);
}

#custom-fields-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.custom-field-item {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
    align-items: center;
    background: var(--bg-card);
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    border: 1px solid var(--border);
    transition: border-color 0.2s;
}

.custom-field-item:hover {
    border-color: var(--primary);
}

.custom-field-item .field-name {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.custom-field-item .field-value-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-self: center;
}

.custom-field-item .field-value {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
}

.custom-field-item .btn-icon-only {
    justify-self: flex-end;
}

.custom-field-item .badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    background: #1a1a1a;
    color: var(--text-muted);
    border-radius: 6px;
    text-transform: uppercase;
    font-weight: 700;
}

/* Search results & Cart */
.search-container {
    position: relative;
    width: 300px;
    display: flex;
    align-items: center;
}

.search-container input {
    width: 100%;
    padding-left: 3.5rem !important;
}

.search-container svg {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    z-index: 5;
}

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #111;
    border: 2px solid var(--border);
    border-top: none;
    border-radius: 0 0 10px 10px;
    z-index: 100;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.search-result-item {
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #1a1a1a;
    color: var(--primary);
}

.cart-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cart-item {
    display: flex;
    align-items: center;
    background: #080808;
    padding: 0.75rem 1.2rem;
    border-radius: 5px;
    border: 2px solid var(--border);
    gap: 1rem;
    transition: border-color 0.2s;
}

.cart-item:hover {
    border-color: var(--primary);
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.cart-item-price {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}

.qty-controls {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border-radius: 8px;
    border: 2px solid var(--border);
    overflow: hidden;
}

.btn-qty {
    background: transparent;
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background 0.2s;
}

.btn-qty:hover {
    background: var(--border);
    color: var(--primary);
}

.qty-input {
    width: 35px !important;
    height: 28px !important;
    text-align: center;
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
}

.btn-remove-item {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.2rem;
    transition: color 0.2s;
    line-height: 1;
}

.btn-remove-item:hover {
    color: var(--primary);
}

/* Settings Lists */
.settings-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #080808;
    border: 2px solid var(--border);
    border-radius: 5px;
    transition: border-color 0.2s;
}

.global-cost-item {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
}

.settings-item:hover {
    border-color: var(--primary);
}

.settings-item .item-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.settings-item .item-name {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: var(--text-main);
}

.settings-item .item-details {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
}

.settings-item .item-actions {
    display: flex;
    gap: 0.5rem;
}

.global-cost-item .cost-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
    text-align: center;
    min-width: 120px;
    justify-self: center;
}

.global-cost-item .item-actions {
    justify-self: flex-end;
}

.inline-add {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
}

.inline-add .form-group {
    margin-bottom: 0 !important;
    flex: 1;
}

.inline-add button {
    height: 52px;
    flex-shrink: 0;
    min-width: 52px;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Photo Upload & Preview */
.save-item-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    align-items: start;
}

.image-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.photo-preview-square {
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 2px dashed var(--border);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    background: var(--bg-input);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.gallery-thumb {
    aspect-ratio: 1/1;
    border-radius: 8px;
    border: 1px solid var(--border);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background: var(--bg-input);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumb.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(247, 37, 73, 0.3);
}

.btn-remove-thumb {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(247, 37, 73, 0.9);
    color: white;
    border: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.main-photo-badge {
    position: absolute;
    bottom: 2px;
    left: 2px;
    background: var(--primary);
    color: white;
    font-size: 8px;
    padding: 2px 4px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 800;
}

.photo-preview-square img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-edit-photo {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    transition: background 0.2s, opacity 0.2s;
    opacity: 0.7;
}

.btn-edit-photo:hover {
    background: var(--primary);
    opacity: 1;
}

#photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.info-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.price-display-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background: #080808;
    border-radius: 15px;
    border: 1px solid var(--border);
}

.price-display-item {
    display: flex;
    flex-direction: column;
}

.price-display-item .price-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.price-display-item strong {
    font-size: 1.8rem;
    color: var(--primary);
}

.actions-section {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
    border-top: 1px solid var(--border);
    padding-top: 2rem;
}

/* Modal Overlay (for Cropper) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.modal-card {
    background: var(--bg-card);
    width: 90%;
    max-width: 600px;
    border-radius: 20px;
    padding: 2.5rem;
    border: 1px solid var(--border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.cropper-wrapper {
    width: 100%;
    height: 400px;
    background: #000;
    margin: 1.5rem 0;
    border-radius: 5px;
    overflow: hidden;
}

/* Catalog Styles */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.catalog-item-card {
    background: var(--bg-card);
    border-radius: 0px;
    border: 2px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    position: relative;
    overflow: hidden;
}

.catalog-item-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    border-color: var(--primary);
}

.catalog-item-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.catalog-item-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.catalog-item-info {
    padding: 1.5rem;
}

.catalog-item-name {
    text-transform: uppercase;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.catalog-item-prices {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.catalog-price-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.catalog-price-row span {
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.catalog-price-row strong {
    color: var(--primary);
}

.catalog-price-row.retail strong {
    color: var(--accent-purple);
}

.btn-delete-item {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(247, 37, 73, 0.8);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
    z-index: 10;
}

.catalog-item-card:hover .btn-delete-item {
    opacity: 1;
}

.btn-delete-item:hover {
    background: var(--primary);
}

/* Item Actions Dropdown */
.item-actions-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    position: absolute;
    right: 0;
    top: 100%;
    background-color: var(--bg-card);
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5);
    z-index: 100;
    border: 2px solid var(--border);
    margin-top: 0.5rem;
    border-radius: 8px;
    overflow: hidden;
}

.dropdown-content button {
    color: var(--text-main);
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    width: 100%;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    text-align: left;
    transition: background 0.2s;
}

.dropdown-content button:hover {
    background-color: #1a1a1a;
}

.dropdown-content button svg {
    color: var(--primary);
}

/* Carousel Styles */
.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    background: #080808;
    border: 1px solid var(--border);
    border-radius: 0px;
    padding: 0.5rem;
    margin-top: 1rem;
}

.detail-carousel {
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    /* Limita para mostrar aprox 7 itens (70px cada + gap) */
    max-width: 560px;
    margin: 0 auto;
}

.detail-carousel::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.btn-carousel {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 5;
    flex-shrink: 0;
}

.btn-carousel:hover {
    background: var(--primary);
    color: black;
}

.carousel-thumb {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: 0px;
    border: 2px solid var(--border);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-input);
}

.carousel-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-thumb.active {
    border-color: var(--primary);
}

/* Image Viewer Modal */
.modal-content-full {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content-full img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 0px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    object-fit: contain;
}

.btn-close-viewer {
    position: absolute;
    top: -40px;
    right: -40px;
    background: transparent;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-close-viewer:hover {
    transform: scale(1.2);
    color: var(--primary);
}

/* Drop Overlay */
.drop-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    pointer-events: none;
    transition: all 0.3s ease;
}

.drop-overlay.hidden {
    display: none;
    opacity: 0;
}

.drop-content {
    width: 100%;
    height: 100%;
    border: 4px dashed var(--primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: var(--primary);
    animation: pulse-border 2s infinite ease-in-out;
}

.drop-content h2 {
    font-size: 2.2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
}

@keyframes pulse-border {
    0%, 100% { border-color: var(--primary); opacity: 1; }
    50% { border-color: rgba(247, 37, 73, 0.3); opacity: 0.7; }
}

/* Global Alerts & Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

.alert-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.alert-card h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    text-transform: uppercase;
    font-weight: 800;
}

.alert-card h2 span {
    color: var(--primary);
}

.alert-card p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
    font-weight: 500;
}

.alert-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.alert-actions button {
    min-width: 120px;
}

/* Vendas Page Styles */
.vendas-stats-section {
    margin-bottom: 3rem;
}

.stats-controls {
    display: flex;
    gap: 2rem;
    align-items: flex-end;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.stats-controls .filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stats-controls label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
}

.stats-controls select, .stats-controls input {
    min-width: 180px;
}

#custom-date-range {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stats-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: #080808;
    padding: 1.5rem;
    border-radius: 5px;
    border: 2px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-card span {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
}

.stat-card strong {
    font-size: 1.5rem;
    color: white;
}

.stat-card.profit {
    border-color: var(--accent-success);
}

.stat-card.profit strong {
    color: var(--accent-success);
}

.stat-card.expense {
    border-color: var(--primary);
}

.stat-card.expense strong {
    color: var(--primary);
}

.vendas-group {
    margin-bottom: 3rem;
}

.group-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.group-header h2 {
    margin: 0;
    text-transform: uppercase;
    font-size: 1.4rem;
}

.group-header h2 span {
    color: var(--primary);
}

.badge {
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 5px;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid var(--primary);
}

.badge.nude {
    background: #222222;
    border: 0px solid transparent;
}

.vendas-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.sale-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 5px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    transition: all 0.3s;
}

.sale-card-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
}

.sale-main-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
}

.sale-item-title {
    margin: 0;
    font-size: 1.1rem;
    text-transform: uppercase;
    font-weight: 700;
}

.sale-values {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.sale-value-item {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.sale-value-item span {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
}

.sale-value-item strong {
    font-size: 1.1rem;
}

.sale-card:hover {
    border-color: var(--primary);
}

.sale-card.agendada {
    border-left: 5px solid #e59c12;
}

.sale-card.concluida {
    border-left: 5px solid var(--accent-success);
}

.sale-card.cancelada {
    border-left: 5px solid #f72549;
}

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

.sale-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.sale-status-badge {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    background: var(--border);
}

.sale-card.agendada .sale-status-badge { background: var(--accent-purple); color: white; }
.sale-card.concluida .sale-status-badge { background: var(--accent-success); color: white; }
.sale-card.cancelada .sale-status-badge { background: #ef4444; color: white; }

.sale-card-body h3 {
    margin: 0;
    font-size: 1.1rem;
    text-transform: uppercase;
}

.pos { color: var(--accent-success) !important; }
.neg { color: #ef4444 !important; }

.sale-card-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.4rem 1rem;
    font-size: 0.75rem;
    flex: 1;
}

/* Modal Wide */
.modal-card.wide {
    max-width: 900px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-table th, .data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
}

.data-table tfoot td {
    font-weight: 800;
    font-size: 1.1rem;
    border-bottom: none;
    padding-top: 2rem;
}

#total-expenses-value {
    color: #ef4444;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    border: 1px dashed var(--border);
}

/* Vendas Nova Specific Overrides */
.vendas-nova-list .settings-item {
    padding: 0.5rem 1.5rem;
}

.vendas-nova-list .btn-icon-only {
    width: 32px;
    height: 32px;
}

.vendas-nova-list .btn-icon-only svg {
    width: 14px;
    height: 14px;
}

/* Custom Pickers */
.custom-picker-trigger {
    width: 100%;
    height: 52px;
    padding: 0 1.2rem;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: border-color 0.2s;
}

.custom-picker-trigger:hover {
    border-color: var(--primary);
}

.custom-picker-trigger span {
    font-size: 1rem;
    font-weight: 500;
}

.custom-picker-trigger svg {
    color: var(--text-muted);
}

.picker-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.picker-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.5rem;
    width: 90%;
    max-width: 350px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

/* Calendar */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.calendar-header h4 {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
}

.calendar-day-name {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    padding-bottom: 0.5rem;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.calendar-day:hover {
    background: rgba(247, 37, 73, 0.1);
    color: var(--primary);
}

.calendar-day.active {
    background: var(--primary);
    color: white;
    font-weight: 700;
}

.calendar-day.empty {
    cursor: default;
}

.calendar-day.empty:hover {
    background: transparent;
}

/* Time Picker */
.time-picker-columns {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    height: 200px;
    position: relative;
    overflow: hidden;
    margin: 1.5rem 0;
}

.time-column {
    flex: 1;
    overflow-y: scroll;
    scrollbar-width: none;
    text-align: center;
    padding: 80px 0; /* Centralização */
}

.time-column::-webkit-scrollbar {
    display: none;
}

.time-item {
    padding: 0.75rem 0;
    font-size: 1.4rem;
    color: var(--text-muted);
    transition: all 0.2s;
    cursor: pointer;
    font-weight: 600;
}

.time-item.selected {
    color: var(--primary);
    font-size: 2rem;
    font-weight: 800;
}

.time-separator {
    display: flex;
    align-items: center;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.picker-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.picker-actions button {
    flex: 1;
}

/* Sale Details Modal Styles */
.sale-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.detail-section {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 0px;
    border: 2px solid var(--border);
}

.detail-section.full-width {
    grid-column: 1 / -1;
}

.detail-section h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.detail-row span {
    color: var(--text-muted);
}

.mini-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mini-list-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    background: rgba(0,0,0,0.2);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
}

.mini-list-item span {
    color: var(--text-muted);
}

.financial-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.financial-card {
    background: var(--bg-input);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    text-align: center;
}

.financial-card span {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.financial-card strong {
    font-size: 1.1rem;
}

.financial-card.highlight {
    border-color: var(--primary);
}

.financial-card.highlight strong {
    color: var(--primary);
}

.financial-breakdown-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.breakdown-column h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.profit-summary {
    display: flex;
    justify-content: flex-end;
    gap: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.profit-item {
    text-align: right;
}

.profit-item span {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

.profit-item strong {
    font-size: 1.8rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.modal-header h2 {
    margin: 0;
    text-transform: uppercase;
}

.modal-header h2 span {
    color: var(--primary);
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.btn-close:hover {
    color: var(--primary);
}

.modal-footer {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* Sale Details Page Styles - New Layout */
.sale-details-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 0.75rem 1.5rem;
    align-items: start;
}

.sale-main-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sale-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h3 {
    margin: 0;
}

.total-badge {
    background: rgba(247, 37, 73, 0.1);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.2rem;
    border: 1px solid rgba(247, 37, 73, 0.2);
}

.financial-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.financial-item {
    background: var(--bg-input);
    padding: 1.2rem;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    border: 2px solid var(--border);
}

.financial-item span {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.financial-item strong {
    font-size: 1.2rem;
}

.financial-item.highlight {
    border-color: var(--primary);
}

.financial-item.highlight strong {
    color: var(--primary);
    font-size: 1.5rem;
}

.details-grid-secondary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1.5rem;
}

.performance-metrics {
    padding: 0.5rem 0;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.progress-container {
    height: 8px;
    background: var(--bg-input);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 1s ease-out;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border);
}

.info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-item span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.info-item strong {
    font-size: 0.9rem;
    text-align: right;
    color: var(--text-muted);
}

.status-badge {
    padding: 0.4rem 1rem;
    border-radius: 50vh;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge.agendada { background: #f39c1222; color: #f39c12; }
.status-badge.concluida { background: #27ae6022; color: #27ae60; }
.status-badge.cancelada { background: #e74c3c22; color: #e74c3c; }

@media (max-width: 900px) {
    .sale-details-layout {
        grid-template-columns: 1fr;
    }

    .details-grid-secondary {
        grid-template-columns: 1fr;
    }
}

.actions-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

/* Landing Page Styles */
.landing-hero {
    height: 40vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 10%;
    background: radial-gradient(circle at center, rgba(247, 37, 73, 0.1) 0%, transparent 70%);
}

.landing-hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.landing-hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 1000px;
    margin-bottom: 2.5rem;
    line-height: 1.6;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0rem 10%;
    padding-top: 4rem;
}

.feature-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border: 2px solid var(--border);
    transition: all 0.3s;
}

.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.feature-card svg {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.5;
    text-align: justify;
}

@media (max-width: 768px) {
    .landing-hero h1 { font-size: 2.5rem; }
    .landing-hero p { font-size: 1rem; }
}

