:root {
    /* Dark Theme (Default) */
    --primary: #8a2be2;
    --secondary: #ff007f;
    --bg-color: #0d0e15;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-color: #ffffff;
    --text-muted: #a0a5b1;
    --sidebar-width: 260px;
    --card-hover-shadow: rgba(0,0,0,0.4);
    --bg-grad-1: rgba(138, 43, 226, 0.15);
    --bg-grad-2: rgba(255, 0, 127, 0.1);
    --title-grad: linear-gradient(to right, #fff, #b3b3b3);
    --icon-bg: rgba(255, 255, 255, 0.05);
    --btn-logout-bg: rgba(255, 77, 77, 0.1);
    --input-bg: rgba(0, 0, 0, 0.2);
    --input-focus-bg: rgba(0, 0, 0, 0.4);
    --shadow-color: rgba(0, 0, 0, 0.5);
    --heading-text: linear-gradient(45deg, #fff, #a0a5b1);
    --toggle-bg: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] {
    /* Light Theme */
    --bg-color: #f9fafb;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.05);
    --text-color: #1f2937;
    --text-muted: #6b7280;
    --card-hover-shadow: rgba(0,0,0,0.1);
    --bg-grad-1: rgba(138, 43, 226, 0.08);
    --bg-grad-2: rgba(255, 0, 127, 0.05);
    --title-grad: linear-gradient(to right, #1f2937, #4b5563);
    --icon-bg: rgba(0, 0, 0, 0.05);
    --btn-logout-bg: rgba(255, 77, 77, 0.05);
    --input-bg: rgba(255, 255, 255, 0.8);
    --input-focus-bg: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --heading-text: linear-gradient(45deg, #1f2937, #4b5563);
    --toggle-bg: rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 10% 20%, var(--bg-grad-1), transparent 25%),
        radial-gradient(circle at 90% 80%, var(--bg-grad-2), transparent 25%);
    background-attachment: fixed;
    background-size: cover;
    color: var(--text-color);
    display: flex;
    height: 100vh;
    overflow: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

body.login-page {
    justify-content: center;
    align-items: center;
}

/* Abstract Background Elements */
.shape {
    position: fixed;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.5;
    animation: float 15s infinite ease-in-out alternate;
}
.shape1 {
    width: 400px; height: 400px;
    background: linear-gradient(to right, var(--primary), #4169e1);
    border-radius: 50%;
    top: -100px; left: -100px;
}
.shape2 {
    width: 500px; height: 500px;
    background: linear-gradient(to right, var(--secondary), #ff8c00);
    border-radius: 50%;
    bottom: -150px; right: -100px;
    animation-delay: -7s;
}

@keyframes float {
    0% { transform: translateY(0) scale(1) rotate(0deg); }
    100% { transform: translateY(-50px) scale(1.1) rotate(5deg); }
}

/* Confetti Background Particles */
.confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--primary);
    top: -20px;
    opacity: 0;
    animation: confetti-fall 4s linear infinite;
}

@keyframes confetti-fall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
    transition: background 0.5s ease, border-color 0.5s ease;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--glass-border);
    transition: transform 0.3s ease;
    z-index: 50;
    position: relative;
}

.sidebar-header {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--glass-border);
}

.sidebar-header .logo-icon {
    font-size: 24px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
    transform: rotate(-10deg);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.sidebar-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--title-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-menu {
    flex-grow: 1;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
}

.sidebar-item {
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    font-weight: 500;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.sidebar-item:hover {
    color: var(--text-color);
    background: var(--icon-bg);
    transform: translateX(5px);
}

.sidebar-item.active {
    color: var(--primary);
    background: rgba(138, 43, 226, 0.1);
    border-left: 3px solid var(--primary);
}

.sidebar-item svg {
    margin-right: 12px;
    width: 22px;
    height: 22px;
    opacity: 0.8;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--glass-border);
}

.btn-logout {
    width: 100%;
    padding: 12px;
    background: var(--btn-logout-bg);
    color: #ff4d4d;
    border: 1px solid rgba(255, 77, 77, 0.2);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-logout:hover {
    background: #ff4d4d;
    color: white;
    box-shadow: 0 5px 15px rgba(255, 77, 77, 0.3);
}

/* Main Content Styles */
.main-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.workspace-container {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 0;
}

.header {
    height: 76px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    border-bottom: 1px solid var(--glass-border);
    z-index: 10;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 24px;
    cursor: pointer;
}

.header-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Theme Toggle Button inside Header */
.theme-toggle {
    background: var(--icon-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-color);
    transition: all 0.3s ease;
}

body.login-page .theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--toggle-bg);
    width: 44px;
    height: 44px;
    backdrop-filter: blur(8px);
    z-index: 100;
}

.theme-toggle:hover {
    transform: scale(1.1);
    background: rgba(138, 43, 226, 0.1);
    color: var(--primary);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--icon-bg);
    padding: 6px 16px 6px 6px;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.user-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-color);
}

.content {
    padding: 40px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    flex-grow: 1;
}

.system-footer {
    width: 100%;
    max-width: 1400px;
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    border-top: 1px solid var(--glass-border);
    font-size: 0.85rem;
    color: var(--text-muted);
    align-self: center;
}

@media (max-width: 768px) {
    .system-footer {
        padding: 20px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

.welcome-section {
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease-out;
}

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

.welcome-section h1 {
    font-size: 2.2rem;
    margin-bottom: 8px;
    font-weight: 700;
    background: var(--title-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-section p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 40;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
    .content { padding: 30px 20px; }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        transform: translateX(calc(var(--sidebar-width) * -1));
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .mobile-menu-btn {
        display: block;
    }
    .sidebar-overlay.show {
        display: block;
        opacity: 1;
    }
    .welcome-section h1 { font-size: 1.8rem; }
    .header-title { display: none; }
}

/* Dashboard Grid Styles */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

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

.stat-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 25px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--card-hover-shadow);
    border-color: var(--primary);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card-purple::before { background: var(--primary); }
.card-orange::before { background: #ff8c00; }
.card-green::before { background: #10b981; }

.stat-card:hover::before {
    opacity: 1;
}

.card-purple { --card-theme: var(--primary); }
.card-orange { --card-theme: #ff8c00; }
.card-green { --card-theme: #10b981; }

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.stat-card-header span {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-muted);
}

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--icon-bg);
    color: var(--card-theme);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.stat-card:hover .icon-box {
    background: var(--card-theme);
    color: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border-color: transparent;
}

.stat-card-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 10px;
}

.stat-card-trend {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    font-weight: 500;
}

.trend-up { color: #10b981; }
.trend-down { color: #f43f5e; }

/* Page Generic Styles */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

@media (max-width: 576px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .page-header > button, .page-header > a, .page-header > div:last-child {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--title-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 127, 0.4);
}

.btn-secondary {
    background: var(--icon-bg);
    color: var(--text-color);
    border: 1px solid var(--glass-border);
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
}

.btn-small {
    background: var(--icon-bg);
    color: var(--text-color);
    border: 1px solid var(--glass-border);
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: 'Outfit', sans-serif;
}

.btn-small:hover {
    background: rgba(255,255,255,0.1);
}

/* Table Styles */
.table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    padding: 20px;
    animation: fadeInUp 0.5s ease-out;
}

.glass-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-color);
    text-align: left;
}

.glass-table th {
    padding: 16px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.95rem;
}

.glass-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 1rem;
    transition: background 0.3s ease;
    vertical-align: middle;
}

.glass-table tbody tr {
    transition: all 0.2s ease;
}

.glass-table tbody tr:hover {
    background: var(--icon-bg);
}

.glass-table tbody tr:last-child td {
    border-bottom: none;
}

.action-btns {
    display: flex;
    gap: 10px;
}

.btn-icon {
    background: var(--icon-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: rgba(255,255,255,0.1);
}

.btn-icon.edit:hover {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border-color: #10b981;
}

.btn-icon.delete:hover {
    background: rgba(244, 63, 94, 0.2);
    color: #f43f5e;
    border-color: #f43f5e;
}

.btn-icon.print:hover {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border-color: #3b82f6;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    width: 100%;
    max-width: 600px; /* Default */
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
}

.modal-content.wide {
    max-width: 800px;
}

.modal-content::-webkit-scrollbar { width: 8px; }
.modal-content::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); border-radius: 4px; }
.modal-content::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 4px; }

.modal-overlay.show .modal-content {
    transform: translateY(0) scale(1);
}

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

.modal-header h3 {
    font-size: 1.5rem;
    margin: 0;
    background: var(--title-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
}

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

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 30px;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group.full-width, .form-group.full {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.form-group input:not([type="file"]):not([type="radio"]), 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-color);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
}

.form-group select option {
    background: var(--bg-color);
    color: var(--text-color);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--primary);
    background: var(--input-focus-bg);
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.15);
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    grid-column: 1 / -1;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-color);
    font-size: 1rem;
}

.radio-group input[type="radio"] {
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
}

/* Utils, Badges & Loaders */
.loader {
    border: 3px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    border-top: 3px solid var(--primary);
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    display: none;
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-aluguel { background: rgba(138, 43, 226, 0.2); color: #d8b4fe; border: 1px solid rgba(138, 43, 226, 0.3); }
.badge-venda { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }

.b-orcamento { background: rgba(156, 163, 175, 0.2); color: #9ca3af; border: 1px solid rgba(156, 163, 175, 0.3); }
.b-reservado { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.b-festa { background: rgba(138, 43, 226, 0.2); color: #d8b4fe; border: 1px solid rgba(138, 43, 226, 0.3); }
.b-devolvido { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }
.b-cancelado { background: rgba(244, 63, 94, 0.2); color: #f43f5e; border: 1px solid rgba(244, 63, 94, 0.3); }

/* Toasts */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-color);
    font-weight: 500;
    box-shadow: 0 10px 30px var(--shadow-color);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success { border-left: 4px solid #10b981; }
.toast.error { border-left: 4px solid #f43f5e; }

/* Page Specific details */

/* Produtos Image Upload */
.image-upload-container { display: flex; gap: 20px; align-items: center; margin-bottom: 20px; }
.image-preview { width: 100px; height: 100px; border-radius: 16px; background: var(--input-bg); border: 2px dashed var(--glass-border); display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.image-preview img { width: 100%; height: 100%; object-fit: cover; }
.image-preview svg { color: var(--text-muted); width: 32px; height: 32px; }
.file-input-wrapper { flex: 1; }
.file-input-wrapper input[type="file"] { display: block; width: 100%; color: var(--text-color); font-family: 'Outfit', sans-serif; font-size: 0.9rem; }
.file-input-wrapper input[type="file"]::file-selector-button { background: var(--icon-bg); border: 1px solid var(--glass-border); color: var(--text-color); padding: 8px 16px; border-radius: 8px; cursor: pointer; margin-right: 15px; transition: all 0.2s ease; font-family: 'Outfit', sans-serif; }
.file-input-wrapper input[type="file"]::file-selector-button:hover { background: rgba(255,255,255,0.1); }
.product-cell { display: flex; align-items: center; gap: 15px; }
.product-thumb { width: 48px; height: 48px; border-radius: 12px; background: var(--input-bg); border: 1px solid var(--glass-border); object-fit: cover; }
.product-info { display: flex; flex-direction: column; }
.product-sku { font-size: 0.8rem; color: var(--text-muted); font-family: monospace; }
.viewer-content { background: transparent; border: none; box-shadow: none; padding: 0; display: flex; flex-direction: column; align-items: center; max-width: 90vw; max-height: 90vh; }
.viewer-content img { max-width: 100%; max-height: 80vh; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); object-fit: contain; }
.viewer-close { background: var(--glass-bg); border: 1px solid var(--glass-border); color: white; border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; cursor: pointer; margin-bottom: 15px; align-self: flex-end; transition: all 0.2s; }
.viewer-close:hover { background: rgba(244, 63, 94, 0.4); border-color: #f43f5e; }

/* Clientes specifics */
.pj-only { display: none; }
.input-with-icon { position: relative; }
.loading-icon { position: absolute; right: 15px; top: 38px; display: none; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.2); border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; }

/* Alugueis specifics */
.items-container { margin-top: 20px; border: 1px solid var(--glass-border); border-radius: 12px; padding: 15px; background: rgba(0,0,0,0.1); }
.items-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid var(--glass-border); }
.items-header h4 { margin: 0; color: var(--text-color); }
.item-row { display: grid; grid-template-columns: 2fr 1fr 1fr 0.5fr; gap: 10px; align-items: center; margin-bottom: 10px; }
.item-row input, .item-row select { padding: 8px 12px; font-size: 0.9rem; }
.btn-remove-item { background: transparent; border: none; color: #f43f5e; cursor: pointer; padding: 5px; }
.total-display { margin-top: 20px; text-align: right; font-size: 1.5rem; font-weight: 700; color: var(--text-color); }

/* Login Page Details */
.login-wrapper { position: relative; z-index: 1; }
.login-container { background: var(--glass-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); padding: 40px; border-radius: 24px; border: 1px solid var(--glass-border); box-shadow: 0 25px 50px -12px var(--shadow-color); width: 340px; transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.5s ease, border-color 0.5s ease; }
.login-container:hover { transform: translateY(-5px); box-shadow: 0 30px 60px -15px var(--shadow-color); }
.login-container h2 { text-align: center; margin-top: 0; margin-bottom: 30px; font-weight: 600; font-size: 28px; background: var(--heading-text); -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: 1px; }
.btn-login { width: 100%; padding: 14px; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white; border: none; border-radius: 12px; cursor: pointer; font-family: 'Outfit', sans-serif; font-size: 16px; font-weight: 600; letter-spacing: 0.5px; transition: all 0.3s ease; margin-top: 10px; box-shadow: 0 10px 20px -10px rgba(138, 43, 226, 0.5); position: relative; overflow: hidden; }
.btn-login::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); transition: all 0.5s ease; }
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 15px 25px -10px rgba(255, 0, 127, 0.5); }
.btn-login:hover::before { left: 100%; }
.btn-login:active { transform: translateY(1px); }
#error-message { color: #ff4d4d; background: rgba(255, 77, 77, 0.1); border: 1px solid rgba(255, 77, 77, 0.2); padding: 10px; border-radius: 8px; text-align: center; margin-top: 20px; font-size: 14px; display: none; animation: shake 0.5s ease-in-out; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-5px); } }
.logo-placeholder { width: 60px; height: 60px; background: linear-gradient(135deg, #fff, #f0f0f0); border-radius: 16px; margin: 0 auto 20px; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 20px rgba(0,0,0,0.1); font-size: 24px; color: var(--primary); font-weight: bold; transform: rotate(-10deg); }
/* Index Specific Styles */
.hero-card {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.1), rgba(255, 0, 127, 0.1));
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.hero-card::after {
    content: '🎉';
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 150px;
    opacity: 0.05;
    transform: rotate(-15deg);
}

.hero-content h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 600px;
}

/* Quick Actions Grid */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.action-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.action-card:hover {
    background: var(--primary);
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(138, 43, 226, 0.3);
    border-color: transparent;
}

.action-card:hover * {
    color: white;
}

.action-card .icon-circle {
    width: 60px;
    height: 60px;
    background: var(--icon-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

.action-card:hover .icon-circle {
    background: rgba(255, 255, 255, 0.2);
}

/* Timeline Activity */
.dashboard-flex {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.activity-panel {
    flex: 1;
    min-width: 350px;
}

.metrics-panel {
    width: 300px;
}

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--glass-border);
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -25px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--bg-color);
}

.timeline-content {
    background: var(--glass-bg);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.timeline-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    display: block;
}

/* Metric Progress Rings/Bars */
.metric-row {
    margin-bottom: 20px;
}

.metric-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border-radius: 4px;
    transition: width 1s ease-in-out;
}

@media (max-width: 768px) {
    .hero-card { padding: 30px; }
    .hero-content h1 { font-size: 2rem; }
}

/* Landing Page Specific Styles */
.landing-page-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-section {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

.hero-badge {
    background: rgba(138, 43, 226, 0.1);
    color: var(--primary);
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 24px;
    border: 1px solid rgba(138, 43, 226, 0.2);
    display: inline-block;
    animation: fadeInDown 0.8s ease-out;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #fff 0%, #a0a5b1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-title span {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-btns {
    display: flex;
    gap: 20px;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

/* Features Grid */
.features-section {
    padding: 100px 0;
}

.section-label {
    text-align: center;
    margin-bottom: 60px;
}

.section-label h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 40px;
    border-radius: 24px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    background: rgba(138, 43, 226, 0.03);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--icon-bg);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    background: var(--primary);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

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

/* App Preview */
.preview-section {
    padding: 100px 0;
}

.preview-window {
    background: #1a1b26;
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 10px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
    position: relative;
    overflow: hidden;
    animation: revealUp 1.2s ease-out;
}

.preview-header {
    height: 40px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 8px;
}

.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-r { background: #ff5f56; }
.dot-y { background: #ffbd2e; }
.dot-g { background: #27c93f; }

.preview-content {
    background: var(--bg-color);
    border-radius: 16px;
    height: 500px;
    background-image: url('https://images.unsplash.com/photo-1460925895917-afdab827c52f?auto=format&fit=crop&q=80&w=2426&ixlib=rb-4.0.3'); /* Placeholder simulation */
    background-size: cover;
    background-position: top center;
    border: 1px solid var(--glass-border);
}

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

/* Landing Footer */
.landing-footer {
    padding: 80px 0 40px;
    border-top: 1px solid var(--glass-border);
    text-align: center;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: inline-block;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);
}

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

@media (max-width: 768px) {
    .hero-title { font-size: 3rem; }
    .hero-btns { flex-direction: column; width: 100%; }
    .hero-btns .btn-primary, .hero-btns .btn-secondary { width: 100%; justify-content: center; }
}

/* Custom Tooltip */
[data-tooltip] {
    position: relative !important;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    top: 50%;
    right: calc(100% + 10px);
    transform: translateY(-50%) translateX(10px);
    background: rgba(15, 15, 25, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    padding: 7px 14px;
    border-radius: 10px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99999;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
}

[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

/* Arrow */
[data-tooltip]::after {
    content: '';
    position: absolute;
    top: 50%;
    right: calc(100% + 2px);
    transform: translateY(-50%) translateX(8px);
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent transparent rgba(15, 15, 25, 0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    z-index: 99999;
    pointer-events: none;
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

/* --- Mobile/Desktop UX Optimizations (ConfettiERP) --- */

/* Scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Responsividade de Tabelas */
.table-responsive, .table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

/* Ajustes de Touch Targets para Telas Touch/Mobile */
@media (max-width: 768px) {
    .btn-primary, .btn-secondary, .btn-logout, .theme-toggle, .btn-icon {
        min-height: 44px;
        min-width: 44px;
    }
    
    .sidebar-item {
        padding: 14px 18px;
    }
    
    .form-group input:not([type="file"]):not([type="radio"]), 
    .form-group select, 
    .form-group textarea {
        min-height: 48px;
        font-size: 16px; /* Evita zoom automático no iOS */
    }
    
    .modal-content {
        width: calc(100vw - 32px);
        margin: 16px;
        padding: 20px;
        max-height: 85vh;
    }
    
    /* Grid de formulário responsiva em mobile */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Otimização de Performance de Rolagem */
.workspace-container, .sidebar-menu, .modal-content {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
