/* Dany & Jack Hotel Inventory Management System */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --light-bg: #ecf0f1;
    --dark-text: #2c3e50;
    --light-text: #7f8c8d;
    --border-color: #bdc3c7;
    --white: #ffffff;
    --sidebar-width: 250px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--dark-text);
    line-height: 1.6;
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: var(--white);
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.logo-section {
    text-align: center;
    margin-bottom: 30px;
}

.logo-placeholder h1 {
    color: var(--primary-color);
    font-size: 2.5em;
    margin-bottom: 5px;
    font-weight: 700;
}

.logo-placeholder p {
    color: var(--light-text);
    font-size: 0.9em;
}

.login-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--dark-text);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.error-message {
    color: var(--danger-color);
    margin-top: 10px;
    padding: 10px;
    background: #fee;
    border-radius: 5px;
    display: none;
}

.login-info {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    font-size: 0.85em;
}

.login-info code {
    background: var(--white);
    padding: 2px 6px;
    border-radius: 3px;
}

/* Header */
.header {
    background: var(--white);
    padding: 15px 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
}

.header-logo {
    display: flex;
    align-items: center;
}

.header-logo h1 {
    color: var(--primary-color);
    font-size: 1.8em;
    font-weight: 700;
    margin: 0;
}

.header-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-nav .nav-link {
    color: var(--dark-text);
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.3s;
    font-weight: 500;
}

.header-nav .nav-link:hover {
    background: var(--light-bg);
    color: var(--secondary-color);
}

.header-nav .nav-link.active {
    background: var(--secondary-color);
    color: var(--white);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-success {
    background: var(--success-color);
    color: var(--white);
}

.btn-success:hover {
    background: #229954;
}

.btn-danger {
    background: var(--danger-color);
    color: var(--white);
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-warning {
    background: var(--warning-color);
    color: var(--white);
}

.btn-warning:hover {
    background: #d68910;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.85em;
}

/* Layout */
.main-container {
    display: flex;
    min-height: calc(100vh - 70px);
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--white);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
    overflow-y: auto;
}

.category-sidebar {
    width: 250px;
    min-height: calc(100vh - 70px);
    background: var(--white);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.sidebar-menu-section {
    border-bottom: 1px solid #ecf0f1;
}

.sidebar-link:hover {
    background: var(--light-bg);
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--dark-text);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: var(--light-bg);
    color: var(--secondary-color);
    border-left: 3px solid var(--secondary-color);
}

.category-list {
    list-style: none;
    padding: 0;
}

.category-item {
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 1px solid var(--light-bg);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-item:hover {
    background: var(--light-bg);
}

.category-item.active {
    background: var(--secondary-color);
    color: var(--white);
}

.category-photo {
    width: 40px;
    height: 40px;
    border-radius: 5px;
    object-fit: cover;
    flex-shrink: 0;
}

.category-item-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-bg);
    border-radius: 5px;
    margin-right: 10px;
    font-size: 1.2em;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.page-title {
    margin-bottom: 20px;
    font-size: 1.8em;
    color: var(--primary-color);
}

/* Card */
.card {
    background: var(--white);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.3em;
    color: var(--primary-color);
}

/* Items Grid */
.items-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.item-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s;
}

.item-card:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.item-photo {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 10px;
}

.item-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.item-unit {
    color: var(--light-text);
    font-size: 0.9em;
    margin-bottom: 10px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
}

.quantity-btn {
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 5px;
    background: var(--secondary-color);
    color: var(--white);
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s;
}

.quantity-btn:hover {
    background: #2980b9;
}

.quantity-btn:disabled {
    background: var(--border-color);
    cursor: not-allowed;
}

.quantity-input {
    width: 80px;
    text-align: center;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1em;
}

/* Forms */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.photo-upload {
    margin-top: 10px;
}

.photo-preview {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
    margin-top: 10px;
    border: 1px solid var(--border-color);
}

/* Table */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: var(--light-bg);
    font-weight: 600;
    color: var(--primary-color);
}

.table tr:hover {
    background: #f8f9fa;
}

/* Actions */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--white);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.user-info-mobile {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 2em;
    color: var(--dark-text);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    padding: 10px 0;
}

.mobile-menu-nav a {
    padding: 15px 20px;
    color: var(--dark-text);
    text-decoration: none;
    border-bottom: 1px solid var(--light-bg);
    transition: all 0.3s;
}

.mobile-menu-nav a:hover {
    background: var(--light-bg);
    color: var(--secondary-color);
    padding-left: 25px;
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
}

.mobile-menu-overlay.active {
    display: block;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .items-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-left {
        flex: 1;
    }
    
    .header-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .user-details {
        display: none;
    }
    
    .main-container {
        flex-direction: column;
    }
    
    .category-sidebar {
        width: 100%;
        max-height: 250px;
        position: relative;
        order: 2;
    }
    
    .main-content {
        order: 1;
    }
    
    .items-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .category-item {
        font-size: 0.9em;
        padding: 10px 15px;
    }
    
    .header-logo h1 {
        font-size: 1.4em;
    }
    
    .category-photo {
        width: 30px;
        height: 30px;
    }
    
    .header {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .items-grid {
        grid-template-columns: 1fr;
    }
    
    .category-photo {
        width: 25px;
        height: 25px;
    }
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--light-text);
}

/* Modal */
.modal {
    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.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 10px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--light-text);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--light-text);
}

.empty-state-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

