/* Networth2 Management Page Styles — Dark Theme */

/* Status Messages */
.status-container {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    border-left: 4px solid;
    font-size: 14px;
    line-height: 1.5;
}

.status-container.success {
    background: #0d2818;
    border-color: #28a745;
    color: #5fba7d;
    display: block;
}

.status-container.error {
    background: #2a0a0a;
    border-color: #dc3545;
    color: #e07070;
    display: block;
}

.status-container.error-details {
    background: #1a1500;
    border-color: #ffc107;
    color: #c9a227;
    display: block;
    margin-top: 10px;
    padding: 10px;
    border-radius: 3px;
    border-left: none;
    font-family: monospace;
    font-size: 12px;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.status-close {
    float: right;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    color: inherit;
    opacity: 0.7;
}

.status-close:hover {
    opacity: 1;
}

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

.confirm-dialog {
    background: #1a1a1a;
    border: 1px solid #2e2e2e;
    border-radius: 8px;
    padding: 30px;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    animation: slideIn 0.3s ease;
}

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

.confirm-dialog p {
    margin: 0 0 20px 0;
    font-size: 16px;
    color: #e0e0e0;
    line-height: 1.5;
}

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

.confirm-actions .btn {
    padding: 10px 20px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary {
    background: #333;
    color: #e0e0e0;
}

.btn-secondary:hover {
    background: #444;
}

.btn-danger:hover {
    background: #c82333;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    border-bottom: 2px solid #2e2e2e;
    flex-wrap: wrap;
}

.tab-button {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #888;
    transition: all 0.3s ease;
}

.tab-button:hover {
    color: #e0e0e0;
    border-bottom-color: #555;
}

.tab-button.active {
    color: #007bff;
    border-bottom-color: #007bff;
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 20px 0;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

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

/* Form Sections */
.form-section {
    background: #1e1e1e;
    border: 1px solid #2e2e2e;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.form-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #e0e0e0;
    font-size: 18px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.form-grid input,
.form-grid select {
    padding: 10px 12px;
    border: 1px solid #2e2e2e;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    background: #111;
    color: #e0e0e0;
}

.form-grid input:focus,
.form-grid select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

.form-grid input[type="number"],
.form-grid input[type="date"] {
    font-size: 14px;
}

.form-grid button {
    grid-column: 1 / -1;
    padding: 12px 24px;
}

/* List Sections */
.list-section {
    margin-bottom: 30px;
}

.list-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #e0e0e0;
    font-size: 18px;
    border-bottom: 2px solid #2e2e2e;
    padding-bottom: 10px;
}

.items-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

/* Item Cards */
.item-card {
    background: #1a1a1a;
    border: 1px solid #2e2e2e;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.item-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    border-color: #007bff;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 10px;
}

.item-header h4 {
    margin: 0;
    font-size: 16px;
    color: #e0e0e0;
    flex: 1;
}

.item-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #1a2a3a;
    color: #5aaaee;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.item-details {
    margin-bottom: 15px;
    font-size: 14px;
    color: #888;
}

.item-details p {
    margin: 5px 0;
    line-height: 1.4;
}

.item-details strong {
    color: #ccc;
}

.item-details .positive {
    color: #28a745;
}

.item-details .negative {
    color: #dc3545;
}

/* Editable Input Fields */
.qty-input-field,
.value-input-field,
.symbol-input-field,
.cash-name-field,
.account-cash-field {
    padding: 4px 8px;
    border: 1px solid #2e2e2e;
    border-radius: 4px;
    font-size: 14px;
    font-family: monospace;
    width: 120px;
    text-align: right;
    background: #111;
    color: #e0e0e0;
}

.symbol-input-field,
.cash-name-field {
    font-family: inherit;
    text-align: left;
    width: 180px;
}

.cash-name-field {
    font-size: 16px;
    font-weight: 600;
    width: auto;
    max-width: 300px;
}

.qty-input-field:focus,
.value-input-field:focus,
.symbol-input-field:focus,
.cash-name-field:focus,
.account-cash-field:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
    background-color: #1a1a2a;
}

/* Buttons */
.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-danger:active {
    transform: scale(0.98);
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 14px;
    border: 2px dashed #2e2e2e;
    border-radius: 8px;
    background: #141414;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tabs { gap: 5px; }
    .tab-button { padding: 8px 12px; font-size: 14px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid button { grid-column: 1; }
    .items-list { grid-template-columns: 1fr; }
    .item-header { flex-direction: column; align-items: flex-start; }
    .item-header h4 { width: 100%; }
    .item-badge { align-self: flex-start; }
}

@media (max-width: 480px) {
    .tabs { gap: 3px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .tab-button { padding: 6px 8px; font-size: 12px; white-space: nowrap; flex-shrink: 0; }
    .form-section { padding: 15px; }
    .item-card { padding: 12px; }
    .item-card button { width: 100%; }
}

/* Page Footer */
.page-footer {
    text-align: center;
    padding: 1.5rem;
    margin-top: 3rem;
    border-top: 1px solid #2e2e2e;
    color: #666;
    font-size: 0.85rem;
    background: #141414;
    border-radius: 0 0 8px 8px;
}

.page-footer p {
    margin: 0;
}
