/* SipSavvy Backend Custom Styles */

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-bg: #f8fafc;
    --border-color: #e2e8f0;
}

/* Body and Layout */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--light-bg);
}

main {
    flex: 1 0 auto;
}

.footer {
    flex-shrink: 0;
}

/* Authentication Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.auth-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 100%;
    max-width: 400px;
}

.auth-header {
    background: var(--primary-color);
    color: white;
    padding: 2rem;
    text-align: center;
}

.auth-header i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.auth-body {
    padding: 2rem;
}

.verification-code-input {
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: 0.5rem;
    font-weight: bold;
}

/* Dashboard Cards */
.stat-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--primary-color);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-dark);
    margin-bottom: 0.25rem;
}

.stat-card .stat-label {
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Wine Management */
.wine-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    transition: box-shadow 0.2s;
}

.wine-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.wine-name {
    font-weight: bold;
    color: var(--primary-dark);
    margin-bottom: 0.25rem;
}

.wine-details {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.wine-price {
    font-weight: bold;
    color: var(--success-color);
}

.wine-status {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.wine-status.in-stock {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.wine-status.out-of-stock {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

/* Wine Color Badges */
.wine-color {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.wine-color.red {
    background: rgba(185, 28, 28, 0.1);
    color: #b91c1c;
}

.wine-color.white {
    background: rgba(161, 161, 170, 0.1);
    color: #52525b;
}

.wine-color.rose {
    background: rgba(236, 72, 153, 0.1);
    color: #ec4899;
}

/* Forms */
.form-floating > label {
    color: var(--secondary-color);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

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

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

/* Navigation */
.navbar-brand {
    font-weight: bold;
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-radius: 5px;
}

/* Tables */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.table {
    background: white;
    margin-bottom: 0;
}

.table thead th {
    background: var(--light-bg);
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    color: var(--primary-dark);
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-color);
    border-color: var(--border-color);
}

.pagination .page-link:hover {
    background-color: var(--light-bg);
    border-color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Search and Filters */
.search-filters {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(99, 102, 241, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-card {
        margin: 1rem;
    }

    .stat-card {
        text-align: center;
        margin-bottom: 1rem;
    }

    .wine-card {
        text-align: left;
    }

    .table-responsive {
        font-size: 0.9rem;
    }
}

/* Utility Classes */
.text-wine-red { color: #b91c1c; }
.text-wine-white { color: #52525b; }
.text-wine-rose { color: #ec4899; }

.bg-light-primary {
    background-color: rgba(99, 102, 241, 0.05);
}

.border-left-primary {
    border-left: 4px solid var(--primary-color) !important;
}

.rounded-lg {
    border-radius: 0.5rem !important;
}

.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

/* Custom Bootstrap Overrides */
.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

.alert-primary {
    color: var(--primary-dark);
    background-color: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
}

/* Dark mode support (for future) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here */
}