:root {
    --primary-green: #074033;
    --secondary-gold: #A48954;
    --bg-ivory: #F9F9F6;
    --white: #ffffff;
    --border-color: #eaeaea;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, sans-serif; }
body { background-color: var(--bg-ivory); color: #333; display: flex; height: 100vh; overflow: hidden; }

.sidebar { width: 260px; background-color: var(--white); display: flex; flex-direction: column; padding: 25px; border-left: 1px solid var(--border-color); box-shadow: -2px 0 10px rgba(0,0,0,0.02); z-index: 10; }
.logo-container { display: flex; justify-content: flex-end; margin-bottom: 40px; border-bottom: 2px solid var(--bg-ivory); padding-bottom: 15px; }
.logo { color: var(--secondary-gold); font-size: 28px; font-weight: bold; letter-spacing: 1px; }
.menu-item { display: block; padding: 14px 18px; color: #666; text-decoration: none; font-size: 15px; margin-bottom: 8px; border-radius: 8px; font-weight: 600; transition: all 0.3s ease; border: 1px solid transparent; }
.menu-item:hover { background-color: var(--bg-ivory); color: var(--primary-green); }
.menu-item.active { background-color: var(--primary-green); color: var(--white); box-shadow: 0 4px 10px rgba(7, 64, 51, 0.2); border: none; }
.logout { margin-top: auto; color: #b91c1c; border-top: 1px solid var(--border-color); padding-top: 15px; }

.main-content { flex: 1; display: flex; flex-direction: column; position: relative; height: 100%; overflow-y: auto; padding: 30px 40px; }

.top-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 2px solid var(--border-color); padding-bottom: 15px; }
.user-info { display: flex; align-items: center; gap: 15px; }
.user-info h2 { color: var(--primary-green); font-size: 24px; font-weight: bold; margin:0; }
.user-badge { font-family: monospace; background: var(--primary-green); color: var(--white); padding: 4px 12px; border-radius: 6px; font-size: 14px; }
.btn-outline { background: transparent; border: 1px solid var(--secondary-gold); color: var(--secondary-gold); padding: 10px 20px; border-radius: 8px; font-weight: bold; font-size: 14px; cursor: pointer; transition: 0.3s; display: flex; align-items: center; gap: 8px; }
.btn-outline:hover { background: var(--secondary-gold); color: var(--white); }

.local-ticker-container { background: var(--white); border: 1px solid var(--border-color); border-radius: 8px; padding: 12px 15px; margin-bottom: 30px; display: flex; align-items: center; overflow: hidden; box-shadow: 0 4px 10px rgba(0,0,0,0.02); }
.ticker-title { color: var(--primary-green); font-weight: bold; font-size: 14px; white-space: nowrap; display: flex; align-items: center; gap: 8px; border-left: 2px solid var(--border-color); padding-left: 15px; margin-left: 15px; }
.ticker-scroll { flex: 1; overflow: hidden; white-space: nowrap; position: relative; }
.rates-wrapper { display: inline-block; animation: scrollTicker 30s linear infinite; }
.rates-wrapper:hover { animation-play-state: paused; }
.rate-item { display: inline-flex; align-items: center; margin-right: 35px; font-size: 14px; color: #555; font-weight: 600; }
.rate-item .r-buy { color: #10b981; }
.rate-item .r-sell { color: #ef4444; }
@keyframes scrollTicker { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }

.tabs-wrapper { display: flex; gap: 15px; background: var(--white); padding: 10px; border-radius: 12px; box-shadow: 0 5px 20px rgba(0,0,0,0.03); border: 1px solid var(--border-color); margin-bottom: 30px; }
.tab-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px 20px; font-size: 15px; font-weight: bold; color: var(--primary-green); background: var(--bg-ivory); border: 1px solid transparent; border-radius: 8px; cursor: pointer; transition: all 0.3s ease; }
.tab-btn svg { width: 22px; height: 22px; stroke: var(--secondary-gold); fill: none; transition: 0.3s; }
.tab-btn:hover { border-color: var(--secondary-gold); background: var(--white); }
.tab-btn.active { background: var(--primary-green); color: var(--white); box-shadow: 0 4px 15px rgba(7, 64, 51, 0.2); border-color: var(--primary-green); }
.tab-btn.active svg { stroke: var(--secondary-gold); }

.tab-content { display: none; animation: fadeIn 0.4s ease; }
.tab-content.active { display: block; }

.alert-success { background-color: #f0fdf4; color: #166534; padding: 16px; border-radius: 8px; margin-bottom: 20px; font-weight: bold; border: 1px solid #bbf7d0; display: flex; align-items: center; gap: 10px; }

.entry-box { background: var(--white); padding: 40px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.03); border: 1px solid var(--border-color); text-align: center; }

.mic-btn { width: 90px; height: 90px; border-radius: 50%; background: var(--bg-ivory); border: 3px solid var(--primary-green); color: var(--primary-green); display: flex; justify-content: center; align-items: center; cursor: pointer; margin: 0 auto 20px auto; transition: all 0.3s ease; box-shadow: 0 10px 20px rgba(7, 64, 51, 0.1); user-select: none; }
.mic-btn:hover { transform: scale(1.05); }
.mic-btn.recording { background: #ef4444; border-color: #ef4444; color: var(--white); animation: pulse 1.5s infinite; transform: scale(1.05); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); } 70% { box-shadow: 0 0 0 20px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }

.transcription-container { display: flex; gap: 10px; margin-bottom: 25px; align-items: stretch; }
.live-transcription-display { flex: 1; background: #f8fafc; border: 1px solid #cbd5e1; padding: 15px; border-radius: 8px; color: var(--primary-green); font-weight: 600; font-size: 15px; text-align: center; transition: 0.3s; }
.live-transcription-display:focus { border-color: var(--secondary-gold); outline: none; background: var(--white); box-shadow: 0 0 0 3px rgba(164, 137, 84, 0.15); }
.btn-action-small { padding: 0 20px; font-weight: bold; border-radius: 8px; border: none; cursor: pointer; transition: 0.3s; font-size: 14px; }

.form-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: right; margin-top: 20px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.span-2 { grid-column: span 2; }
.span-4 { grid-column: span 4; }

label { font-size: 13px; color: var(--primary-green); font-weight: bold; }
select, input { padding: 14px 16px; border: 1px solid #ddd; border-radius: 8px; font-size: 15px; background-color: var(--bg-ivory); transition: 0.3s; color: #333; font-weight: 600; width: 100%; }
select:focus, input:focus { border-color: var(--secondary-gold); background-color: var(--white); outline: none; box-shadow: 0 0 0 3px rgba(164, 137, 84, 0.15); }

.btn-submit { grid-column: span 4; padding: 16px; background-color: var(--primary-green); border: none; color: var(--white); font-weight: bold; cursor: pointer; border-radius: 8px; transition: 0.3s; font-size: 16px; margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.btn-submit:hover { background-color: #053026; transform: translateY(-2px); }

.table-container { background: var(--white); border-radius: 12px; box-shadow: 0 5px 20px rgba(0,0,0,0.02); border: 1px solid var(--border-color); overflow: hidden; }
table { width: 100%; border-collapse: collapse; text-align: right; }
th, td { padding: 16px 20px; border-bottom: 1px solid #f5f5f5; font-size: 14px; }
th { background: var(--primary-green); color: var(--white); font-weight: bold; font-size: 13px; }
tr:hover { background-color: var(--bg-ivory); }
.text-green { color: #10b981; font-weight: bold; direction: ltr; display: inline-block; }
.text-red { color: #ef4444; font-weight: bold; direction: ltr; display: inline-block; }
.time-stamp { color: #888; font-size: 11px; direction: ltr; display: block; margin-top: 4px; font-family: monospace;}

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(7, 64, 51, 0.8); backdrop-filter: blur(4px); display: none; justify-content: center; align-items: center; z-index: 1000; }
.modal-overlay.active { display: flex; }
.modal-container { background: var(--white); width: 100%; max-width: 500px; border-radius: 16px; padding: 35px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.3); position: relative; border-top: 5px solid var(--secondary-gold); }
.modal-close { position: absolute; top: 20px; left: 20px; background: #f5f5f5; border: none; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 18px; }
.preview-box { background: var(--bg-ivory); border: 1px dashed var(--secondary-gold); padding: 25px; border-radius: 8px; margin: 20px 0; font-size: 15px; line-height: 2; text-align: right; }
.btn-gold { padding: 14px; background: var(--secondary-gold); color: var(--white); border: none; font-weight: bold; cursor: pointer; border-radius: 8px; width: 100%; font-size: 15px; margin-top: 15px; text-decoration: none; display: block; text-align: center; transition:0.3s; }
.btn-gold:hover { background: #8c7445; }