/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    min-height: 100vh;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar h1 {
    font-size: 28px;
    font-weight: bold;
}

.navbar-links {
    display: flex;
    gap: 20px;
}

.navbar a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
    margin-left: 20px;
}

.navbar a:hover {
    opacity: 0.8;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 15px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #bbb;
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 12px;
    border: 1px solid #333;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
    background: #2a2a2a;
    color: #e0e0e0;
    transition: border-color 0.3s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

input[readonly] {
    background: #1a1a1a;
    cursor: not-allowed;
    color: #999;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Alerts */
.alert {
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-size: 14px;
}

.alert-error {
    background-color: #3a2a2a;
    color: #ff6b6b;
    border: 1px solid #5a3a3a;
}

.alert-success {
    background-color: #2a3a2a;
    color: #6bff6b;
    border: 1px solid #3a5a3a;
}

/* Cards and Sections */
.card {
    background: #1e1e1e;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    border: 1px solid #333;
    margin-bottom: 30px;
}

.welcome-section {
    background: #1e1e1e;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    margin-bottom: 40px;
    border: 1px solid #333;
}

.welcome-section h1 {
    color: #e0e0e0;
    margin-bottom: 10px;
    font-size: 32px;
}

.welcome-section p {
    color: #bbb;
    font-size: 16px;
}

/* Headings */
h1 {
    color: #e0e0e0;
    margin-bottom: 10px;
    font-size: 24px;
}

h2 {
    color: #e0e0e0;
    margin-bottom: 20px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 15px;
}

h3 {
    color: #bbb;
    font-size: 18px;
}

/* Login/Register Specific */
.auth-container {
    background: #1e1e1e;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 400px;
    border: 1px solid #333;
    margin: auto;
}

.auth-container h1 {
    text-align: center;
    font-size: 24px;
}

.subtitle {
    text-align: center;
    color: #999;
    margin-bottom: 30px;
    font-size: 14px;
}

.logo {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: bold;
    color: #667eea;
}

.register-link,
.login-link {
    text-align: center;
    margin-top: 20px;
    color: #999;
    font-size: 14px;
}

.register-link a,
.login-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.register-link a:hover,
.login-link a:hover {
    text-decoration: underline;
}

/* Dashboard Specific */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: #1e1e1e;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    border-left: 4px solid #667eea;
    border: 1px solid #333;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.7);
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
}

.stat-label {
    color: #bbb;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.action-card {
    background: #1e1e1e;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    color: #e0e0e0;
    border: 1px solid #333;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.7);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.action-card-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.action-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 600;
}

.action-card p {
    font-size: 13px;
    opacity: 0.8;
}

/* Items List Specific */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: #1e1e1e;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    border: 1px solid #333;
}

.header h2 {
    color: #e0e0e0;
    margin: 0;
    border: none;
    padding: 0;
}

.filters {
    background: #1e1e1e;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    border: 1px solid #333;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filters button {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
}

.filters button:hover {
    background: #764ba2;
}

.table-container {
    background: #1e1e1e;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    border: 1px solid #333;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #2a2a2a;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #e0e0e0;
    border-bottom: 2px solid #667eea;
}

td {
    padding: 15px;
    border-bottom: 1px solid #333;
    color: #bbb;
}

tr:hover {
    background: #252525;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.empty-state a:hover {
    text-decoration: underline;
}

/* Detail Groups */
.detail-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 20px;
}

.detail-group {
    padding: 15px;
    background: #2a2a2a;
    border-radius: 5px;
    border-left: 4px solid #667eea;
}

.detail-label {
    font-weight: 600;
    color: #999;
    margin-bottom: 5px;
    font-size: 12px;
    text-transform: uppercase;
}

.detail-value {
    color: #e0e0e0;
    font-size: 16px;
}

/* Status Badges */
.status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-active {
    background: #2a3a2a;
    color: #6bff6b;
}

.status-inactive {
    background: #2a2a3a;
    color: #9999bb;
}

.status-damaged {
    background: #3a2a2a;
    color: #ff6b6b;
}

.status-lost {
    background: #3a2a2a;
    color: #ff6b6b;
}

/* Barcode Display */
.barcode-display {
    background: #1e1e1e;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    border: 1px solid #333;
}

.barcode-display img {
    max-width: 300px;
    height: auto;
    margin: 20px 0;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #333;
}

.tab-button {
    padding: 10px 20px;
    background: transparent;
    border: none;
    color: #bbb;
    cursor: pointer;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-button.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-button:hover {
    color: #e0e0e0;
}

/* Info Box */
.info-box {
    background: #2a2a2a;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.info-label {
    color: #666;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.info-value {
    color: #e0e0e0;
    font-size: 16px;
    font-weight: 500;
}

/* Profile Container */
.profile-container {
    background: #1e1e1e;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    border: 1px solid #333;
}

.form-container {
    background: #1e1e1e;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    border: 1px solid #333;
}

.form-section {
    margin-bottom: 30px;
}

.form-section h3 {
    color: #bbb;
    font-size: 18px;
    margin-bottom: 20px;
    margin-top: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-row-full {
    display: grid;
    grid-template-columns: 1fr;
}

/* Recent Items Section */
.recent-items {
    background: #1e1e1e;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    border: 1px solid #333;
}

.recent-items h2 {
    color: #e0e0e0;
    margin-bottom: 20px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 15px;
}

/* User Type Selection Buttons */
.user-action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.type-btn {
    flex: 1;
    padding: 15px;
    border: 2px solid #444;
    background: #2a2a2a;
    color: #b0b0b0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    line-height: 1.5;
}

.type-btn:hover {
    background: #333;
    border-color: #667eea;
    color: #e0e0e0;
}

.type-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: #fff;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.4);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease-in;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #1e1e1e;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.9);
    border: 1px solid #333;
    max-width: 500px;
    width: 90%;
    animation: slideIn 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
}

.modal-header h2 {
    color: #e0e0e0;
    margin: 0;
    font-size: 22px;
}

.close-modal {
    background: none;
    border: none;
    color: #bbb;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #667eea;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Barcode Scanner Styling */
.scanner-section {
    margin: 30px 0;
}

.scanner-card {
    background: linear-gradient(135deg, #1e1e1e 0%, #2a2a2a 100%);
    padding: 25px;
    border-radius: 10px;
    border: 2px solid #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.scanner-card h3 {
    color: #667eea;
    margin: 0 0 10px 0;
    font-size: 20px;
}

.scanner-card p {
    color: #b0b0b0;
    margin: 5px 0 20px 0;
    font-size: 14px;
}

.scanner-input-group {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.barcode-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #444;
    border-radius: 8px;
    background: #0f0f0f;
    color: #e0e0e0;
    font-size: 16px;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
}

.barcode-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
    background: #1a1a1a;
}

.barcode-input::placeholder {
    color: #666;
}

.scanner-status {
    font-size: 18px;
    font-weight: 600;
    min-width: 150px;
    text-align: center;
    height: 24px;
    display: flex;
    align-items: center;
}

.scanner-hint {
    color: #999;
    font-size: 12px;
    margin: 10px 0 0 0;
    font-style: italic;
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    .detail-row {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .action-cards {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .navbar {
        flex-direction: column;
        gap: 15px;
    }

    .navbar-links {
        flex-direction: column;
        gap: 10px;
    }

    .navbar a {
        margin-left: 0;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
    }
}
