/* ============================================
   BIDDING SYSTEM - WINDOWS 7 BLUE THEME
   Mobile-Friendly Responsive Design
   ============================================ */

:root {
    --primary: #0A64AD;
    --primary-dark: #085191;
    --accent: #2B579A;
    --accent-light: #3D6BA8;
    --light-blue: #E8F4FC;
    --white: #FFFFFF;
    --gray: #F5F5F5;
    --text: #333333;
    --text-light: #666666;
    --border: #CCCCCC;
    --success: #4CAF50;
    --warning: #FF9800;
    --error: #F44336;
    --info: #2196F3;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #E8F4FC 0%, #FFFFFF 100%);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* Navbar */
.navbar {
    background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
    color: var(--white);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(10, 100, 173, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-role {
    background: var(--white);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
}

.user-role.admin {
    background: var(--warning);
    color: var(--white);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--accent);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--accent-light);
}

.btn-warning {
    background: var(--warning);
    color: var(--white);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-error {
    background: var(--error);
    color: var(--white);
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.9rem;
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

.btn-tiny {
    padding: 4px 10px;
    font-size: 0.8rem;
}

.btn-confirm {
    background: var(--success);
    color: var(--white);
}

.btn-reject {
    background: var(--error);
    color: var(--white);
}

/* Cards */
.dashboard-card,
.form-card,
.table-card,
.item-card {
    background: var(--white);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--light-blue);
}

.dashboard-card h2,
.form-card h2,
.table-card h2 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 1.4rem;
    border-bottom: 2px solid var(--light-blue);
    padding-bottom: 10px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--light-blue);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Admin Actions */
.admin-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.admin-actions .btn-large {
    flex: 1;
    min-width: 150px;
}

.btn-icon {
    margin-right: 8px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

/* Items Grid */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

/* Item Card */
.item-card {
    background: var(--white);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--light-blue);
    transition: transform 0.3s ease;
}

.item-card:hover {
    transform: translateY(-5px);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.item-number {
    background: var(--light-blue);
    color: var(--primary);
    padding: 5px 12px;
    font-size: 0.85rem;
    font-weight: bold;
    border-radius: 4px;
}

.auction-status,
.item-status,
.bid-status,
.allocation-status,
.sale-status {
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 4px;
    text-transform: uppercase;
}

.auction-status.active,
.item-status.active,
.bid-status.active {
    background: var(--success);
    color: var(--white);
}

.auction-status.closed,
.item-status.closed,
.bid-status.closed,
.allocation-status.finalized,
.sale-status.completed {
    background: var(--text-light);
    color: var(--white);
}

.allocation-status.pending {
    background: var(--warning);
    color: var(--white);
}

.allocation-status.confirmed {
    background: var(--success);
    color: var(--white);
}

.allocation-status.rejected {
    background: var(--error);
    color: var(--white);
}

.item-card h3 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.item-desc {
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

/* Item Meta */
.item-meta {
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray);
}

.meta-label {
    color: var(--text-light);
}

.meta-value {
    color: var(--primary);
    font-weight: 600;
}

/* Item Detail Page */
.item-detail {
    background: var(--white);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.item-detail h1 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 15px;
}

.item-info {
    margin: 25px 0;
}

.info-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray);
}

.info-label {
    color: var(--text-light);
    width: 180px;
    font-weight: 600;
}

.info-value {
    color: var(--text);
}

/* Bid Section */
.bid-section {
    background: var(--light-blue);
    border-radius: 8px;
    padding: 25px;
    margin: 25px 0;
    border: 2px solid var(--primary);
}

.bid-section h2 {
    color: var(--primary);
    margin-bottom: 20px;
}

.bid-form {
    max-width: 500px;
}

.bid-form .form-group {
    margin-bottom: 15px;
}

.bid-total {
    background: var(--white);
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary);
    display: flex;
    justify-content: space-between;
}

/* Bids Section */
.bids-section {
    margin-top: 30px;
}

.bids-section h2 {
    color: var(--primary);
    margin-bottom: 20px;
}

.top-bids {
    background: var(--white);
    border-radius: 8px;
    padding: 20px;
    border: 2px solid var(--primary);
}

.top-bid {
    padding: 15px;
    margin-bottom: 15px;
    background: var(--light-blue);
    border-radius: 4px;
    border-left: 4px solid var(--primary);
}

.top-bid:first-child {
    background: linear-gradient(135deg, #FFF9E6 0%, var(--light-blue) 100%);
    border-left-color: var(--warning);
}

.top-bid-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.top-bid-rank {
    background: var(--primary);
    color: var(--white);
    padding: 4px 12px;
    font-weight: bold;
    border-radius: 4px;
}

.top-bid-1 .top-bid-rank {
    background: var(--warning);
}

.bid-details {
    margin-top: 10px;
}

.bid-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
}

/* Forms */
.form {
    max-width: 700px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
    transition: border 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--light-blue);
}

/* Alerts */
.alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    border: 1px solid;
}

.alert-success {
    background: #E8F5E9;
    color: var(--success);
    border-color: var(--success);
}

.alert-error {
    background: #FFEBEE;
    color: var(--error);
    border-color: var(--error);
}

.alert-warning {
    background: #FFF3E0;
    color: var(--warning);
    border-color: var(--warning);
}

.alert-info {
    background: var(--light-blue);
    color: var(--info);
    border-color: var(--info);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--gray);
}

.data-table th {
    background: var(--light-blue);
    color: var(--primary);
    font-weight: bold;
}

.data-table tr:hover {
    background: var(--gray);
}

/* Role Badge */
.role-badge {
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 4px;
    text-transform: uppercase;
}

.role-buyer {
    background: var(--info);
    color: var(--white);
}

.role-seller {
    background: var(--accent);
    color: var(--white);
}

.role-admin {
    background: var(--warning);
    color: var(--white);
}

/* Empty State */
.empty-state,
.empty-text {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: var(--white);
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.login-card h1 {
    color: var(--primary);
    text-align: center;
    margin-bottom: 10px;
}

.login-title {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 30px;
}

.login-help {
    margin-top: 25px;
    padding: 15px;
    background: var(--light-blue);
    border-radius: 4px;
    font-size: 0.9rem;
}

.login-help ul {
    margin-top: 10px;
    padding-left: 20px;
}

/* Confirmation Page */
.confirmation-page {
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--white) 100%);
}

.confirmation-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
}

.confirmation-card {
    background: var(--white);
    border-radius: 8px;
    padding: 40px;
    max-width: 600px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 3px solid var(--primary);
}

.confirmation-card h1 {
    color: var(--primary);
    text-align: center;
    margin-bottom: 10px;
}

.confirmation-item-number {
    text-align: center;
    background: var(--light-blue);
    color: var(--primary);
    padding: 8px 16px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 4px;
    margin-bottom: 20px;
}

.confirmation-card h2 {
    color: var(--primary);
    text-align: center;
    margin-bottom: 15px;
}

.item-description {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 25px;
}

.allocation-details-big {
    background: var(--light-blue);
    padding: 25px;
    margin: 25px 0;
    border-radius: 8px;
    border: 2px solid var(--primary);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.detail-row.total {
    border-bottom: none;
    background: var(--white);
    margin: 10px -10px -10px -10px;
    padding: 20px;
    border-radius: 4px;
}

.detail-label {
    color: var(--text-light);
    font-weight: 600;
}

.detail-value {
    color: var(--primary);
    font-weight: bold;
    font-size: 1.1rem;
}

.detail-value.big {
    font-size: 1.5rem;
}

.detail-value.big-total {
    font-size: 2rem;
    color: var(--success);
}

.detail-value.expires-countdown {
    color: var(--warning);
}

.confirmation-info {
    background: var(--gray);
    padding: 20px;
    margin: 25px 0;
    border-radius: 4px;
}

.confirmation-info h3 {
    color: var(--primary);
    margin-bottom: 15px;
}

.confirmation-info ul {
    padding-left: 20px;
}

.confirmation-info li {
    margin-bottom: 8px;
    color: var(--text);
}

.confirmation-form {
    text-align: center;
}

.confirmation-text {
    text-align: center;
    color: var(--text-light);
    margin-top: 15px;
    font-size: 0.9rem;
}

/* User Dashboard Lists */
.bids-list,
.allocations-list,
.sales-list,
.items-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bid-item,
.allocation-item,
.sale-item {
    background: var(--gray);
    padding: 20px;
    border-radius: 4px;
    border-left: 4px solid var(--primary);
}

.bid-item:hover,
.allocation-item:hover,
.sale-item:hover {
    background: var(--light-blue);
}

.bid-header,
.allocation-header,
.sale-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.allocation-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.allocation-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

/* Seller Items */
.items-list-small {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mini-item {
    background: var(--gray);
    padding: 15px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mini-item-header {
    display: flex;
    gap: 10px;
    align-items: center;
}

.mini-item-body {
    flex: 1;
    margin: 0 15px;
}

.mini-item-meta {
    display: flex;
    gap: 15px;
    margin-top: 5px;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Auctions List */
.auctions-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auction-item {
    background: var(--gray);
    padding: 20px;
    border-radius: 4px;
}

.auction-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.auction-month {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary);
}

.auction-date,
.auction-closed {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 5px;
}

/* Filter Card */
.filter-card {
    background: var(--white);
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 8px;
    border: 1px solid var(--light-blue);
}

.filter-form {
    display: flex;
    gap: 15px;
}

.filter-form .form-group {
    margin-bottom: 0;
}

.filter-form select {
    min-width: 300px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-user {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .container {
        padding: 20px 15px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .items-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .admin-actions {
        flex-direction: column;
    }
    
    .admin-actions .btn-large {
        width: 100%;
    }
    
    .table-responsive {
        overflow-x: auto;
    }
    
    .data-table {
        font-size: 0.9rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 4px;
    }
    
    .filter-form {
        flex-direction: column;
    }
    
    .filter-form select {
        min-width: 100%;
    }
    
    .confirmation-card {
        padding: 25px;
    }
    
    .detail-row {
        flex-direction: column;
        gap: 5px;
    }
    
    .allocation-actions {
        flex-direction: column;
    }
    
    .mini-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .mini-item-meta {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .item-detail h1 {
        font-size: 1.5rem;
    }
    
    .confirmation-card h1 {
        font-size: 1.3rem;
    }
    
    .btn-large {
        padding: 12px 20px;
        font-size: 1rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.item-card,
.dashboard-card,
.stat-card {
    animation: fadeIn 0.5s ease;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Focus States */
a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

button:focus,
a:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .admin-actions {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
}