/* Bloomberg Terminal Style - Dark Theme */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #252525;
    --bg-input: #1e1e1e;
    --orange: #ff8c00;
    --orange-dim: #cc7000;
    --green: #00d26a;
    --red: #ff3b3b;
    --blue: #0088cc;
    --white: #ffffff;
    --gray: #888888;
    --gray-light: #aaaaaa;
    --border: #333333;
}

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

body {
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    background: var(--bg-primary);
    color: var(--white);
    min-height: 100vh;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.logo-container {
    background: #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.logo-img {
    max-width: 200px;
    height: auto;
}

.logo-img:first-child {
    margin-bottom: -40px;
}

.logo-img:last-child {
    margin-top: -40px;
}

.login-header {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--orange);
    margin-bottom: 5px;
}

.login-subtitle {
    color: var(--gray);
    font-size: 0.8rem;
    margin-bottom: 30px;
}

.diamond {
    color: var(--orange);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.input-group label {
    color: var(--gray-light);
    font-size: 0.75rem;
}

.input-group input {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--white);
    padding: 12px;
    font-family: inherit;
    font-size: 1rem;
}

.input-group input:focus {
    outline: none;
    border-color: var(--orange);
}

.btn-login {
    background: var(--orange);
    color: var(--bg-primary);
    border: none;
    padding: 15px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
}

.btn-login:hover {
    background: var(--orange-dim);
}

.login-footer {
    margin-top: 30px;
    text-align: center;
    color: var(--gray);
    font-size: 0.75rem;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    margin-right: 5px;
}

.flash-message {
    padding: 10px;
    margin-bottom: 20px;
    font-size: 0.85rem;
}

.flash-error {
    background: rgba(255, 59, 59, 0.2);
    border: 1px solid var(--red);
    color: var(--red);
}

/* Dashboard */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
}

.header-left {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--orange);
}

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

.counter-box {
    background: var(--bg-secondary);
    padding: 8px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.counter-label {
    font-size: 0.65rem;
    color: var(--gray);
}

.counter-value {
    font-size: 1.1rem;
    font-weight: 700;
}

.counter-value.green {
    color: var(--green);
}

.counter-value.orange {
    color: var(--orange);
}

.btn-logout {
    background: var(--bg-tertiary);
    color: var(--orange);
    padding: 8px 15px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
}

.btn-logout:hover {
    background: var(--border);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    margin-bottom: 15px;
}

.panel-header {
    padding: 10px 15px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--orange);
    border-bottom: 1px solid var(--border);
}

.panel-body {
    padding: 15px;
}

.form-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-row label {
    width: 180px;
    color: var(--gray-light);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.form-row input,
.form-row select,
.form-row textarea {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--white);
    padding: 10px;
    font-family: inherit;
    font-size: 0.9rem;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--orange);
}

.form-row select {
    cursor: pointer;
}

.form-row textarea {
    resize: vertical;
    min-height: 80px;
}

.data-value {
    font-size: 0.9rem;
}

.green-text {
    color: var(--green) !important;
}

.total-amount {
    color: var(--orange);
    font-size: 1.1rem;
    font-weight: 700;
}

.import-hint {
    color: var(--gray);
    font-size: 0.75rem;
    margin-bottom: 10px;
}

.import-row {
    display: flex;
    gap: 10px;
}

.import-row input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--white);
    padding: 10px;
    font-family: inherit;
}

.button-row {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Buttons */
.btn {
    background: var(--bg-tertiary);
    color: var(--orange);
    border: none;
    padding: 10px 20px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

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

.btn.small {
    padding: 8px 15px;
    font-size: 0.75rem;
}

.btn.large {
    padding: 15px 25px;
    font-size: 1rem;
    font-weight: 700;
}

.btn.orange {
    background: var(--orange);
    color: var(--bg-primary);
}

.btn.orange:hover {
    background: var(--orange-dim);
}

.btn.green {
    background: var(--green);
    color: var(--bg-primary);
}

.btn.green:hover {
    background: #00aa55;
}

.btn.green:disabled {
    background: var(--bg-tertiary);
    color: var(--gray);
    cursor: not-allowed;
}

.btn.blue {
    background: var(--blue);
    color: var(--white);
}

.btn.blue:hover {
    background: #006699;
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* Status Bar */
.status-bar {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    background: var(--bg-tertiary);
    font-size: 0.8rem;
}

.status-ready {
    color: var(--green);
}

.status-working {
    color: var(--orange);
}

.status-error {
    color: var(--red);
}

#current-time {
    color: var(--orange);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--bg-secondary);
    width: 90%;
    max-width: 900px;
    height: 90%;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--bg-primary);
    color: var(--orange);
    font-weight: 700;
}

.btn-close {
    background: var(--red);
    color: var(--white);
    border: none;
    width: 30px;
    height: 30px;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    flex: 1;
    padding: 0;
}

.modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive */
@media (max-width: 768px) {
    .header-left {
        font-size: 1rem;
    }
    
    .form-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .form-row label {
        width: auto;
    }
    
    .form-row input,
    .form-row select,
    .form-row textarea {
        width: 100%;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
}
