:root {
    --bg-dark: #121212;
    --bg-sidebar: #1a1a1a;
    --bg-card: #242424;
    --accent: #1a6bcc; /* QuetzalTech Blue */
    --accent-hover: #2179e0;
    --accent-rgb: 26, 107, 204;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --danger: #ef4444;
    --success: #22c55e;
    --border: #333333;
    --sidebar-width: 320px;
    --header-height: 80px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
}

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

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.sidebar-header {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.logo i {
    color: var(--accent);
}

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

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

.add-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.search-container {
    padding: 0 20px 20px 20px;
    position: relative;
}

.search-container i {
    position: absolute;
    left: 32px;
    top: 50%;
    transform: translateY(-50%) translateY(-10px);
    width: 16px;
    color: var(--text-secondary);
}

.search-container input {
    width: 100%;
    background: #0f0f0f;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 12px 12px 40px;
    color: white;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.search-container input:focus {
    border-color: var(--accent);
}

.product-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 12px;
}

.product-item {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
}

.product-item i {
    width: 18px;
    opacity: 0.7;
}

.product-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.product-item.active {
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent);
    font-weight: 600;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.tab-btn i {
    width: 20px;
}

.tab-btn.active {
    background: var(--bg-card);
    color: var(--accent);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: radial-gradient(circle at top right, #1d1d1d, #121212);
}

.main-header {
    height: var(--header-height);
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.header-info h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.header-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 4px;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    border: 1px solid var(--border);
}

.action-btn.secondary {
    background: var(--bg-card);
    color: white;
}

.action-btn.danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
}

.action-btn.secondary:hover {
    background: #333;
}

.action-btn.danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* Views */
.view {
    display: none;
    padding: 40px;
    overflow-y: auto;
    flex: 1;
}

.view.active {
    display: block;
}

/* Responses Grid */
.responses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.response-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.response-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.response-card h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.response-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    white-space: pre-wrap;
}

.card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.copy-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

.copy-btn.copied {
    background: var(--success);
}

.tiny-btn {
    background: rgba(255,255,255,0.05);
    border: none;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tiny-btn:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

/* Calculator Card */
.calculator-card {
    max-width: 600px;
    margin: 0 auto;
    padding: 32px;
    border-radius: 24px;
}

.glass {
    background: rgba(36, 36, 36, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.calc-header i {
    color: var(--accent);
}

.input-group {
    margin-bottom: 24px;
}

.input-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.price-wrapper {
    display: flex;
    align-items: center;
    background: #0f0f0f;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0 16px;
    transition: border-color 0.2s;
}

.price-wrapper:focus-within {
    border-color: var(--accent);
}

.price-wrapper span {
    color: var(--accent);
    font-weight: 700;
    font-size: 1.2rem;
}

.price-wrapper input {
    background: transparent;
    border: none;
    color: white;
    padding: 16px;
    font-size: 1.5rem;
    font-weight: 700;
    width: 100%;
    outline: none;
    font-family: 'JetBrains Mono', monospace;
}

.installments-results {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 30px;
}

.installment-item {
    background: rgba(255,255,255,0.03);
    padding: 16px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid transparent;
}

.installment-item:hover {
    background: rgba(255,255,255,0.05);
}

.inst-label {
    font-weight: 600;
}

.inst-value {
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
}

.inst-total {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.text-output {
    background: #0a0a0a;
    border-radius: 12px;
    padding: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 15px 0;
    white-space: pre-wrap;
    border: 1px solid var(--border);
}

.copy-full-btn {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    background: var(--accent);
    color: white;
    border: none;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
}

.copy-full-btn:hover {
    background: var(--accent-hover);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    text-align: center;
    gap: 20px;
}

.empty-state i {
    width: 64px;
    height: 64px;
    opacity: 0.2;
}

/* Fabric Floating Button */
.fab {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 64px;
    height: 64px;
    border-radius: 32px;
    background: var(--accent);
    color: white;
    border: none;
    box-shadow: 0 10px 25px rgba(var(--accent-rgb), 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: all 0.3s;
}

.fab:hover {
    transform: scale(1.1) rotate(90deg);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal {
    width: 100%;
    max-width: 450px;
    padding: 32px;
    border-radius: 24px;
}

.modal h2 {
    margin-bottom: 24px;
}

.modal-body input, .modal-body textarea {
    width: 100%;
    background: #0f0f0f;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    color: white;
    margin-bottom: 20px;
    outline: none;
}

.modal-body textarea {
    height: 150px;
    resize: none;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-confirm {
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
}

.btn-cancel {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 12px 24px;
    cursor: pointer;
}

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

.view.active {
    animation: fadeIn 0.4s ease-out;
}

.product-item {
    animation: fadeIn 0.3s ease-out forwards;
}
