/* FlipCoin - Modern Coin Collection Management */

* {
    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;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-title {
    font-size: 1.8rem;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.container {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    font-weight: 600;
}

.page-description {
    color: #6c757d;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.stat-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 1rem;
    opacity: 0.9;
}

/* Dashboard Actions */
.dashboard-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

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

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

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

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Forms */
.add-form {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #495057;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: #6c757d;
    font-size: 0.9rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Quick Add Section */
.quick-add-section {
    margin-top: 2rem;
}

.quick-add-section h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.quick-add-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.quick-add-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.quick-add-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.quick-add-card h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.quick-add-card p {
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.quick-add-card small {
    color: #adb5bd;
    font-style: italic;
}

/* Quick Count Buttons */
.quick-count-buttons {
    margin-top: 0.5rem;
}

.quick-count-buttons button {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Collection Grid */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.collection-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.collection-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

/* Quarter Images */
.quarter-image {
    text-align: center;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.quarter-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e9ecef;
    transition: all 0.3s ease;
}

.collection-item:hover .quarter-img {
    border-color: #667eea;
    transform: scale(1.05);
}

/* Design Selector */
.design-selector {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: start;
}

.design-preview {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    min-width: 150px;
}

.preview-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e9ecef;
    margin-bottom: 0.5rem;
}

.preview-info {
    font-size: 0.9rem;
    color: #6c757d;
}

.preview-info p {
    margin: 0;
}

.preview-info strong {
    color: #2c3e50;
}

.collection-item.needed {
    border-color: #dc3545;
    background: linear-gradient(135deg, #fff5f5 0%, #ffeaea 100%);
}

.collection-item.low {
    border-color: #ffc107;
    background: linear-gradient(135deg, #fffbf0 0%, #fff8e1 100%);
}

.collection-item.sufficient {
    border-color: #28a745;
    background: linear-gradient(135deg, #f0fff4 0%, #e8f5e8 100%);
}

.item-header {
    margin-bottom: 1rem;
}

.item-header h3 {
    color: #2c3e50;
    margin-bottom: 0.25rem;
    font-size: 1.2rem;
}

.item-series {
    color: #6c757d;
    font-size: 0.9rem;
    font-style: italic;
}

.item-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.owned-count {
    text-align: center;
}

.count-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
}

.count-label {
    font-size: 0.9rem;
    color: #6c757d;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.needed {
    background: #dc3545;
    color: white;
}

.status-badge.low {
    background: #ffc107;
    color: #212529;
}

.status-badge.sufficient {
    background: #28a745;
    color: white;
}

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

/* Collection Filters */
.collection-filters {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #495057;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* Collection Stats */
.collection-stats {
    display: flex;
    justify-content: space-around;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
}

.stat-label {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Recent Activity */
.recent-activity {
    margin-top: 2rem;
}

.recent-activity h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.activity-list {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
}

.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

.activity-item:last-child {
    border-bottom: none;
}

.quarter-name {
    font-weight: 600;
    color: #2c3e50;
}

.quarter-series {
    color: #6c757d;
    font-style: italic;
    margin-left: 0.5rem;
}

.quarter-condition {
    color: #495057;
    font-size: 0.9rem;
}

.quarter-date {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Inventory Tabs */
.inventory-tabs {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 1rem 2rem;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 600;
    color: #6c757d;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn:hover,
.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-pane {
    display: none;
}

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

/* Needed List */
.needed-list {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
}

.series-group {
    margin-bottom: 2rem;
}

.series-group h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #667eea;
}

.needed-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border: 1px solid #e9ecef;
}

.design-name {
    font-weight: 600;
    color: #2c3e50;
}

/* Low Stock List */
.low-stock-list {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
}

.low-stock-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid #e9ecef;
}

.item-info {
    flex: 1;
}

.item-info .design-name {
    font-weight: 600;
    color: #2c3e50;
    display: block;
}

.item-info .series {
    color: #6c757d;
    font-style: italic;
    font-size: 0.9rem;
}

.stock-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 1rem;
}

.stock-count {
    font-weight: 600;
    color: #495057;
}

.stock-status {
    color: #ffc107;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Series Status */
.series-status {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
}

.series-stat {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid #e9ecef;
}

.series-stat.complete {
    border-color: #28a745;
    background: linear-gradient(135deg, #f0fff4 0%, #e8f5e8 100%);
}

.series-stat.almost-complete {
    border-color: #17a2b8;
    background: linear-gradient(135deg, #e6f7ff 0%, #f0f9ff 100%);
}

.series-stat.half-complete {
    border-color: #ffc107;
    background: linear-gradient(135deg, #fffbf0 0%, #fff8e1 100%);
}

.series-stat.incomplete {
    border-color: #dc3545;
    background: linear-gradient(135deg, #fff5f5 0%, #ffeaea 100%);
}

.series-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.series-header h4 {
    color: #2c3e50;
    margin: 0;
}

.completion-percentage {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
}

.series-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.progress-text {
    color: #6c757d;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* No Data */
.no-data {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-actions {
        flex-direction: column;
    }
    
    .collection-grid {
        grid-template-columns: 1fr;
    }
    
    .collection-filters {
        grid-template-columns: 1fr;
    }
    
    .collection-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .inventory-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        text-align: center;
    }
    
    .activity-item {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .needed-item,
    .low-stock-item {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .series-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .series-progress {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .design-selector {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .design-preview {
        min-width: auto;
    }
    
    .quarter-img {
        width: 60px;
        height: 60px;
    }
    
    .preview-image {
        width: 80px;
        height: 80px;
    }
}
