/* QuickBooks Inventory Manager Styles */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: linear-gradient(135deg, #0077c5 0%, #005a9e 100%);
    color: white;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
}

nav {
    margin-top: 1rem;
}

main {
    flex: 1;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

footer {
    text-align: center;
    padding: 2rem;
    color: #666;
    margin-top: 2rem;
}

/* Messages */
.messages {
    margin-bottom: 2rem;
}

.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    margin: 0.25rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: #0077c5;
    color: white;
}

.btn-primary:hover {
    background-color: #005a9e;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
    transform: translateY(-1px);
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #1e7e34;
    transform: translateY(-1px);
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
    transform: translateY(-1px);
}

/* Sections */
.authorized-section,
.unauthorized-section {
    text-align: center;
    padding: 2rem;
}

.authorized-section h2,
.unauthorized-section h2 {
    color: #0077c5;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.actions {
    margin-top: 2rem;
}

/* Inventory Controls */
.inventory-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: #0077c5;
    box-shadow: 0 0 0 2px rgba(0, 119, 197, 0.2);
}

.export-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Inventory Stats */
.inventory-stats {
    background-color: #e9ecef;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.inventory-stats p {
    margin: 0;
    font-size: 1.1rem;
}

/* Table */
.table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.inventory-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.9rem;
}

.inventory-table th {
    background-color: #0077c5;
    color: white;
    padding: 1rem 0.75rem;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.inventory-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
}

.inventory-table tbody tr:hover {
    background-color: #f8f9fa;
}

.inventory-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.inventory-table tbody tr:nth-child(even):hover {
    background-color: #e9ecef;
}

/* Number formatting */
.number {
    text-align: right;
    font-family: 'Courier New', monospace;
}

.currency {
    text-align: right;
    font-family: 'Courier New', monospace;
    font-weight: 500;
}

/* Edit functionality styles */
.quantity-edit {
    width: 80px;
    padding: 0.25rem;
    border: 1px solid #0077c5;
    border-radius: 3px;
    text-align: right;
    font-family: 'Courier New', monospace;
}

.quantity-edit:focus {
    outline: none;
    border-color: #005a9e;
    box-shadow: 0 0 0 2px rgba(0, 119, 197, 0.2);
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    margin: 0.1rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* No data state */
.no-data {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.no-data h3 {
    color: #0077c5;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    main {
        padding: 1rem;
    }
    
    .inventory-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .export-actions {
        justify-content: center;
    }
    
    .inventory-table {
        font-size: 0.8rem;
    }
    
    .inventory-table th,
    .inventory-table td {
        padding: 0.5rem 0.25rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 1rem;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .inventory-table th,
    .inventory-table td {
        padding: 0.25rem;
        font-size: 0.75rem;
    }
}
