/**
 * CheckItOut - Main Styles
 * Using Friendliest Games color scheme
 */

:root {
    /* Friendliest Games Color Scheme */
    --bg-gradient-start: #e0f2fe;
    --bg-gradient-end: #bae6fd;
    --header-bg: rgba(65, 80, 150, 0.9);
    --accent-primary: #667eea;
    --accent-secondary: #764ba2;
    --panel-bg: rgba(255, 255, 255, 0.95);
    --panel-border: rgba(102, 126, 234, 0.2);
    --text-primary: #333;
    --text-secondary: #555;
    --text-muted: #999;
    
    /* Functional Colors */
    --success: #10b981;
    --success-hover: #059669;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --warning: #f59e0b;
    --info: #667eea;
    
    /* UI Elements */
    --border-radius: 10px;
    --box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    --box-shadow-hover: 0 4px 8px rgba(0,0,0,0.15);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Header */
.header {
    background-color: var(--header-bg);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
}

.header h1 {
    margin: 0;
    font-size: 24px;
    color: white;
    flex-shrink: 0;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-stats {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Admin Dropdown */
.admin-dropdown {
    position: relative;
}

.admin-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    box-shadow: var(--box-shadow);
    transition: transform 0.2s ease;
}

.admin-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.admin-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--panel-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-hover);
    min-width: 200px;
    z-index: 1000;
    margin-top: 5px;
    border: 1px solid var(--panel-border);
}

.admin-menu.show {
    display: block;
}

.admin-menu-item {
    padding: 12px 20px;
    cursor: pointer;
    color: var(--text-primary);
    border-bottom: 1px solid var(--panel-border);
    transition: background 0.2s ease;
}

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

.admin-menu-item:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--accent-primary);
}

/* Main Container */
.main-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 20px;
    height: calc(100vh - 100px);
}

/* Left Column: Checked Out Games */
.left-column {
    width: 350px;
    background: var(--panel-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.left-column .section-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.left-column .section-header h3 {
    margin: 0;
    font-size: 16px;
    color: white;
}

.checked-out-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.checked-out-item {
    padding: 15px 20px;
    border-bottom: 1px solid var(--panel-border);
    cursor: pointer;
    transition: background 0.2s;
}

.checked-out-item:hover {
    background: rgba(102, 126, 234, 0.05);
}

.checked-out-item .game-name {
    font-weight: bold;
    color: var(--accent-primary);
}

.checked-out-item .customer-info {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 5px;
}

.no-history {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

/* Center Column: Main Interface */
.center-column {
    flex: 1;
    overflow-y: auto;
    min-width: 500px;
}

/* Right Column: Transaction History */
.right-column {
    width: 400px;
    background: var(--panel-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.right-column .section-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.right-column .section-header h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: white;
}

.history-game-name {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.history-item {
    padding: 15px 20px;
    border-bottom: 1px solid var(--panel-border);
    font-size: 14px;
}

.history-item:nth-child(even) {
    background: rgba(102, 126, 234, 0.03);
}

.history-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.history-action {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.history-action.checkout {
    background: var(--danger);
    color: white;
}

.history-action.checkin {
    background: var(--success);
    color: white;
}

.history-customer-id {
    font-weight: bold;
    color: var(--text-primary);
}

.history-customer-name {
    color: var(--text-secondary);
    font-size: 13px;
}

.history-timestamp {
    color: var(--text-muted);
    font-size: 12px;
}

/* Panels */
.panel {
    background: var(--panel-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
}

.panel h2 {
    margin: 0 0 20px 0;
    color: var(--accent-primary);
    font-size: 24px;
}

.action-panel {
    display: none;
}

.action-panel.active {
    display: block;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-input {
width: 100%;
padding: 15px;
font-size: 16px;
border: 2px solid var(--panel-border);
border-radius: 8px;
outline: none;
transition: border-color 0.3s ease;
background: white;
color: var(--text-primary);
}

.form-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input.large {
    font-size: 20px;
    padding: 18px;
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* Buttons */
.btn {
    padding: 12px 25px;
    font-size: 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
    box-shadow: var(--box-shadow);
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: var(--success-hover);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: var(--danger-hover);
}

.btn-secondary {
    background: rgba(102, 126, 234, 0.1);
    color: var(--accent-primary);
}

.btn-secondary:hover {
    background: rgba(102, 126, 234, 0.2);
}

.btn:disabled {
    background: #e5e7eb;
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

.action-btn {
    padding: 18px 30px;
    font-size: 16px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
    box-shadow: var(--box-shadow);
}

.action-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
}

.action-btn:disabled {
    background: #e5e7eb !important;
    color: var(--text-muted) !important;
    cursor: not-allowed;
    transform: none;
}

.action-btn.checkin-btn {
    background: var(--success);
    color: white;
}

.action-btn.checkout-btn {
    background: var(--danger);
    color: white;
}

.action-btn.edit-btn {
    background: var(--accent-primary);
    color: white;
}

/* Messages */
.message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    font-weight: 500;
}

.message.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-left: 4px solid var(--success);
    display: block;
}

.message.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-left: 4px solid var(--danger);
    display: block;
}

.message.info {
    background: rgba(102, 126, 234, 0.1);
    color: var(--accent-primary);
    border-left: 4px solid var(--accent-primary);
    display: block;
}

/* Status Badges */
.status-badge {
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
}

.status-badge.available {
    background: var(--success);
    color: white;
}

.status-badge.checked-out {
    background: var(--danger);
    color: white;
}

/* Selected Game Display */
.selected-game-display {
    background: rgba(102, 126, 234, 0.05);
    border: 2px solid var(--accent-primary);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-top: 20px;
}

.selected-game-display .label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 5px;
    font-weight: 600;
}

.selected-game-display .game-name {
    font-size: 22px;
    font-weight: bold;
    color: var(--accent-primary);
}

.selected-game-display .game-id {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 5px;
}

.selected-game-display .game-status {
    margin-top: 12px;
}

/* Search Results */
.search-results {
    margin-top: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.search-result-item {
    padding: 15px;
    background: white;
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-result-item:hover {
    background: rgba(102, 126, 234, 0.05);
    border-color: var(--accent-primary);
    transform: translateX(5px);
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.show {
    display: flex;
}

.modal-box {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--accent-primary);
    margin-bottom: 15px;
}

.modal-title.warning {
    color: var(--warning);
}

.modal-title.error {
    color: var(--danger);
}

.modal-message {
    color: var(--text-primary);
    line-height: 1.8;
    margin-bottom: 25px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.modal-btn-primary {
    background: var(--accent-primary);
    color: white;
}

.modal-btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.modal-btn-secondary {
    background: rgba(102, 126, 234, 0.1);
    color: var(--accent-primary);
}

.modal-btn-secondary:hover {
    background: rgba(102, 126, 234, 0.2);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* Responsive */
@media (max-width: 1200px) {
    .main-container {
        flex-direction: column;
        height: auto;
    }
    
    .left-column,
    .right-column {
        width: 100%;
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
    }
    
    .center-column {
        min-width: auto;
    }
}
