/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #f8f9fa;
}

/* Login Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    color: #333;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #666;
    margin: 0;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.btn {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #667eea;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #5a6fd8;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-block {
    width: 100%;
}

.btn-outline-light {
    background-color: transparent;
    color: white;
    border: 1px solid white;
}

.btn-outline-light:hover {
    background-color: white;
    color: #333;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 12px;
}

.alert {
    padding: 0.75rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.spinner-border {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    vertical-align: text-bottom;
    border: 0.125em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

.spinner-border-sm {
    width: 0.875rem;
    height: 0.875rem;
    border-width: 0.125em;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

/* Main Layout Styles */
.main-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background-color: #343a40;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left h1 {
    margin: 0;
    font-size: 1.5rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    font-size: 0.9rem;
}

.main-content {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Dashboard Styles */
.dashboard {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dashboard-header {
    background-color: #f8f9fa;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.filter-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.currency-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.filter-btn {
    padding: 0.25rem 0.5rem;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s;
}

.filter-btn:hover {
    background-color: #e9ecef;
}

.filter-btn.active {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.entries-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.entries-info select {
    padding: 0.25rem;
    border: 1px solid #dee2e6;
    border-radius: 3px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-box input {
    padding: 0.25rem 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    font-size: 12px;
}

/* Table Styles */
.data-table {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.table th,
.table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
    white-space: nowrap;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table th:hover {
    background-color: #e9ecef;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

.text-right {
    text-align: right;
}

.sort-indicator {
    margin-left: 0.25rem;
    font-size: 10px;
}

/* Status Badges */
.status-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.status-sent {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.status-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-failed {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-info {
    background-color: #cce7ff;
    color: #004085;
    border: 1px solid #b8daff;
}

.status-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-default {
    background-color: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

/* Action Buttons */
.action-buttons-inline {
    display: flex;
    gap: 0.25rem;
}

.btn-action {
    background: none;
    border: 1px solid #dee2e6;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10px;
    transition: all 0.2s;
}

.btn-action:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
}

/* Pagination */
.pagination {
    padding: 1rem;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-number {
    padding: 0.25rem 0.5rem;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 3px;
}

/* Validation Styles */
.validation-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 0.25rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }
    
    .filter-section {
        flex-direction: column;
    }
    
    .currency-filters {
        max-height: 120px;
        overflow-y: auto;
    }
    
    .entries-info {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pagination {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Blazor Error UI */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Professional Navigation Bar */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-nav .nav-link {
    font-size: 13px;
    font-weight: 500;
    padding: 0.7rem 1rem;
    transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.navbar-nav .dropdown-menu {
    border: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    border-radius: 6px;
    padding: 0.5rem 0;
    min-width: 180px;
}

.navbar-nav .dropdown-item {
    font-size: 13px;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.navbar-nav .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #2c3e50;
}

.navbar-nav .dropdown-item i {
    width: 16px;
    text-align: center;
}

.navbar-brand {
    font-size: 16px;
    font-weight: 600;
}

.navbar-text {
    font-size: 13px;
}

/* User dropdown */
.navbar-nav .dropdown-menu-end {
    right: 0;
    left: auto;
}

/* Logo hover effect */
.navbar-brand:hover {
    transform: scale(1.02);
    transition: transform 0.2s ease;
}

/* Responsive navigation */
@media (max-width: 992px) {
    .navbar-nav {
        padding: 1rem 0;
    }
    
    .navbar-nav .nav-link {
        border-bottom: 1px solid rgba(255,255,255,0.1);
        border-radius: 0;
    }
    
    .navbar-nav .dropdown-menu {
        background-color: rgba(0,0,0,0.1);
        border-radius: 0;
        box-shadow: none;
        margin-left: 1rem;
    }
}