/* Transaction Screen Specific Styles */

/* Welcome/Home Screen */
.welcome-screen {
    padding: 20px;
}

.welcome-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--sap-blue);
}

.welcome-header .logo {
    font-size: 48px;
}

.welcome-header h1 {
    font-size: 24px;
    color: var(--sap-blue);
    margin-bottom: 4px;
}

.welcome-header p {
    font-size: 12px;
    color: var(--sap-dark-gray);
}

/* Task List Panel */
.task-panel {
    background: #fffdf0;
    border: 2px inset var(--sap-dark-gray);
    padding: 16px;
    margin-bottom: 16px;
}

.task-panel-title {
    font-size: 14px;
    font-weight: bold;
    color: var(--sap-blue);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-item {
    display: flex;
    align-items: center;
    padding: 8px;
    margin-bottom: 4px;
    background: white;
    border: 1px solid #e0e0e0;
    font-size: 13px;
}

.task-item:hover {
    background: #f8f8f0;
}

.task-item.completed {
    background: #f0fff0;
    text-decoration: line-through;
    color: var(--sap-dark-gray);
}

.task-item .checkbox {
    width: 16px;
    height: 16px;
    margin-right: 12px;
    accent-color: var(--sap-green);
}

.task-item .task-code {
    font-family: var(--font-mono);
    background: var(--sap-light-gray);
    padding: 2px 6px;
    margin-right: 12px;
    font-size: 12px;
    border-radius: 2px;
}

.task-item .task-name {
    flex: 1;
}

.task-item .task-reward {
    color: var(--sap-green);
    font-weight: bold;
    margin-left: 12px;
}

.task-item .task-urgent {
    color: var(--sap-red);
    font-size: 10px;
    margin-left: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Stats Panel */
.stats-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: white;
    border: 2px inset var(--sap-dark-gray);
    padding: 12px;
    text-align: center;
}

.stat-card .icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.stat-card .value {
    font-size: 24px;
    font-weight: bold;
    font-family: var(--font-mono);
}

.stat-card .label {
    font-size: 12px;
    color: var(--sap-dark-gray);
}

.stat-card.points .value {
    color: var(--sap-green);
}

.stat-card.errors .value {
    color: var(--sap-red);
}

.stat-card.level .value {
    color: var(--sap-blue);
}

/* Tips Panel */
.tips-panel {
    background: #f0f8ff;
    border: 1px solid #b0c4de;
    padding: 12px;
    font-size: 12px;
}

.tips-panel .title {
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--sap-blue);
}

.tips-panel ul {
    margin-left: 20px;
}

.tips-panel li {
    margin-bottom: 4px;
}

/* Error/Dump Screen */
.dump-screen {
    background: #000080;
    color: #ffff00;
    font-family: var(--font-mono);
    padding: 20px;
    white-space: pre-wrap;
    font-size: 13px;
    min-height: 400px;
    line-height: 1.4;
}

.dump-screen .dump-title {
    font-size: 16px;
    margin-bottom: 16px;
    color: #ff6666;
}

.dump-screen .dump-section {
    margin-bottom: 16px;
}

.dump-screen .dump-section-title {
    color: #66ff66;
    margin-bottom: 8px;
}

/* No Authorization Screen */
.noauth-screen {
    text-align: center;
    padding: 40px;
}

.noauth-screen .icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.noauth-screen h2 {
    color: var(--sap-red);
    margin-bottom: 16px;
}

.noauth-screen p {
    font-size: 12px;
    color: var(--sap-dark-gray);
    margin-bottom: 8px;
}

.noauth-screen .auth-object {
    font-family: var(--font-mono);
    background: #fff0f0;
    padding: 12px;
    margin: 16px auto;
    max-width: 400px;
    text-align: left;
    font-size: 12px;
    border: 1px solid #ffcccc;
}

/* Locked Screen */
.locked-screen {
    text-align: center;
    padding: 40px;
}

.locked-screen .icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.locked-screen h2 {
    color: var(--sap-orange);
    margin-bottom: 16px;
}

.locked-screen .lock-info {
    font-family: var(--font-mono);
    background: #fff8e0;
    padding: 12px;
    margin: 16px auto;
    max-width: 400px;
    font-size: 12px;
    border: 1px solid #ffe0a0;
}

/* Transaction Entry Screens */
.entry-screen {
    max-width: 500px;
}

.entry-screen .hint {
    font-size: 12px;
    color: var(--sap-dark-gray);
    margin-top: 4px;
    margin-left: 172px;
}

/* Detail Screens */
.detail-screen {
    max-width: 800px;
}

.detail-screen .section-title {
    font-size: 13px;
    font-weight: bold;
    color: var(--sap-blue);
    margin: 16px 0 8px;
    padding: 4px 8px;
    background: #f0f4f8;
}

/* Display Only Fields */
.display-field {
    font-weight: bold;
    padding: 2px 4px;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    min-width: 200px;
    display: inline-block;
}

/* F4 Help Modal */
.f4-help-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--sap-gray);
    border: 2px outset var(--window-border);
    min-width: 400px;
    max-width: 600px;
    z-index: 10001;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.3);
}

.f4-help-title {
    background: linear-gradient(to bottom, var(--sap-blue), var(--sap-dark-blue));
    color: white;
    padding: 4px 8px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    cursor: grab;
    user-select: none;
}

.f4-help-title:active {
    cursor: grabbing;
}

.f4-help-search {
    padding: 8px;
    border-bottom: 1px solid var(--sap-dark-gray);
}

.f4-help-search input {
    width: 100%;
    height: 26px;
    border: 2px inset var(--sap-dark-gray);
    padding: 2px 8px;
    font-size: 13px;
}

.f4-help-list {
    max-height: 300px;
    overflow-y: auto;
}

.f4-help-item {
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    gap: 16px;
}

.f4-help-item:hover {
    background: #e0e8f0;
}

.f4-help-item .code {
    font-family: var(--font-mono);
    min-width: 80px;
}

.f4-help-item .desc {
    color: var(--sap-dark-gray);
}

.f4-help-buttons {
    padding: 8px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Achievement Popup */
.achievement-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #ffd700, #ffb700);
    border: 4px solid #b8860b;
    padding: 32px;
    text-align: center;
    z-index: 10002;
    animation: achievementBounce 0.5s ease-out;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

@keyframes achievementBounce {
    0% { transform: translate(-50%, -50%) scale(0); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

.achievement-popup .icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.achievement-popup h2 {
    color: #8b4513;
    margin-bottom: 8px;
}

.achievement-popup p {
    color: #654321;
    font-size: 14px;
}

.achievement-popup .points {
    font-size: 24px;
    font-weight: bold;
    color: #006400;
    margin-top: 12px;
}

/* Level Up Screen */
.levelup-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10003;
}

.levelup-content {
    background: linear-gradient(135deg, #4a0080, #800080);
    border: 4px solid #ffd700;
    padding: 48px;
    text-align: center;
    color: white;
    animation: levelUpGlow 2s infinite;
}

@keyframes levelUpGlow {
    0%, 100% { box-shadow: 0 0 20px #ffd700; }
    50% { box-shadow: 0 0 40px #ffd700, 0 0 60px #ff69b4; }
}

.levelup-content h1 {
    font-size: 36px;
    margin-bottom: 16px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.levelup-content .new-level {
    font-size: 48px;
    margin: 24px 0;
}

.levelup-content .unlocks {
    text-align: left;
    margin-top: 24px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.1);
}

.levelup-content .unlocks h3 {
    margin-bottom: 8px;
}

.levelup-content .unlocks li {
    margin: 4px 0;
    margin-left: 20px;
}

/* ============================================
   SE80 - ABAP Workbench / Object Navigator
   ============================================ */

.se80-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #f0f0f0;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    font-size: 12px;
}

/* SE80 Toolbar */
.se80-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: linear-gradient(to bottom, #f8f8f8, #e8e8e8);
    border-bottom: 1px solid #a0a0a0;
}

.se80-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #e8e8e8;
    border: 1px solid #a0a0a0;
    border-radius: 2px;
    cursor: pointer;
    font-size: 11px;
    color: #333;
    transition: all 0.1s ease;
}

.se80-btn:hover {
    background: #d0d0d0;
    border-color: #808080;
}

.se80-btn:active {
    background: #c0c0c0;
}

.se80-toolbar-sep {
    width: 1px;
    height: 20px;
    background: #a0a0a0;
    margin: 0 4px;
}

/* Main Layout */
.se80-main {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* Tree Panel */
.se80-tree-panel {
    width: 280px;
    background: white;
    border-right: 1px solid #a0a0a0;
    display: flex;
    flex-direction: column;
}

.se80-tree-header {
    padding: 6px 8px;
    background: linear-gradient(to bottom, var(--sap-blue), #1a3a5f);
    color: white;
    font-weight: bold;
    font-size: 11px;
}

.se80-tree {
    flex: 1;
    overflow: auto;
    padding: 4px 0;
}

.se80-tree-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.se80-tree-item:hover {
    background: #e8f0f8;
}

.se80-tree-item.selected {
    background: var(--sap-blue);
    color: white;
}

.se80-tree-toggle {
    width: 12px;
    text-align: center;
    font-size: 8px;
    color: #666;
}

.se80-tree-spacer {
    width: 12px;
}

.se80-tree-icon {
    font-size: 14px;
}

.se80-tree-name {
    font-family: 'Consolas', monospace;
    font-size: 11px;
}

/* Editor Panel */
.se80-editor-panel {
    flex: 1;
    background: white;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.se80-editor-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #888;
}

.se80-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.se80-empty-text {
    font-size: 14px;
    margin-bottom: 8px;
}

.se80-empty-hint {
    font-size: 12px;
    color: #aaa;
}

.se80-editor-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: linear-gradient(to bottom, #f8f8f8, #e8e8e8);
    border-bottom: 1px solid #d0d0d0;
}

.se80-editor-icon {
    font-size: 20px;
}

.se80-editor-title {
    font-family: 'Consolas', monospace;
    font-weight: bold;
    color: var(--sap-blue);
}

.se80-editor-type {
    font-size: 11px;
    color: #666;
    background: #e8e8e8;
    padding: 2px 8px;
    border-radius: 10px;
}

.se80-editor-info {
    padding: 8px 12px;
    background: #fffde7;
    border-bottom: 1px solid #e0d8a0;
    font-size: 11px;
    color: #666;
}

.se80-code-container {
    flex: 1;
    overflow: auto;
    background: #1e1e1e;
}

.se80-code {
    margin: 0;
    padding: 12px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.5;
    color: #d4d4d4;
    white-space: pre;
    tab-size: 2;
}

/* ABAP Syntax Highlighting */
.abap-keyword {
    color: #569cd6;
    font-weight: bold;
}

.abap-comment {
    color: #6a9955;
    font-style: italic;
}

.abap-string {
    color: #ce9178;
}

.abap-builtin {
    color: #4ec9b0;
}

/* Package Info */
.se80-package-info {
    padding: 16px;
}

.se80-package-info h4 {
    color: var(--sap-blue);
    margin-bottom: 12px;
}

.se80-package-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.se80-package-info li {
    padding: 6px 8px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 12px;
}

.se80-package-info li:hover {
    background: #f8f8f8;
}

/* Status Bar */
.se80-statusbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 12px;
    background: #e0e0e0;
    border-top: 1px solid #a0a0a0;
    font-size: 11px;
    color: #666;
}

.se80-status-right {
    display: flex;
    gap: 12px;
}
