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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f9fc;
    overflow: hidden;
}

/* Login Page */
.login-page {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    z-index: 10000;
}

.login-page.active {
    display: flex;
}

.login-container {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-box {
    background: white;
    padding: 50px;
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(33, 150, 243, 0.3);
    width: 100%;
    max-width: 450px;
    animation: slideUp 0.6s ease-out;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo-large {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.login-header h1 {
    color: #1976d2;
    font-size: 36px;
    margin-bottom: 10px;
    font-weight: 700;
}

.login-header p {
    color: #64b5f6;
    font-size: 16px;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon svg {
    position: absolute;
    left: 16px;
    color: #64b5f6;
    pointer-events: none;
}

.input-with-icon input {
    padding-left: 48px !important;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #64b5f6;
    font-size: 14px;
}

.checkbox input {
    margin-right: 8px;
    cursor: pointer;
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.4);
}

.login-footer {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #e3f2fd;
    text-align: center;
}

.login-footer p {
    color: #64b5f6;
    font-size: 14px;
}

.login-footer strong {
    color: #1976d2;
}

/* Main App */
.main-app {
    display: none;
}

.main-app.active {
    display: flex;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: white;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    box-shadow: 2px 0 10px rgba(33, 150, 243, 0.1);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f5f9fc;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #bbdefb;
    border-radius: 3px;
}

.sidebar.collapsed {
    transform: translateX(-280px);
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid #e3f2fd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #1976d2;
}

.logo svg {
    color: #2196f3;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: #64b5f6;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: none;
}

.sidebar-toggle:hover {
    background: #e3f2fd;
    color: #1976d2;
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: #64b5f6;
    text-decoration: none;
    transition: all 0.3s ease;
    margin: 4px 15px;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
}

.nav-link:hover {
    background: #e3f2fd;
    color: #1976d2;
}

.nav-link.active {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: white;
}

.nav-link svg {
    min-width: 20px;
}

/* Multi-layer Menu */
.nav-item-group {
    margin: 4px 0;
}

.nav-link.has-submenu {
    position: relative;
}

.submenu-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.nav-link.has-submenu.active .submenu-arrow {
    transform: rotate(90deg);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f5f9fc;
    margin: 4px 15px;
    border-radius: 10px;
}

.submenu.open {
    max-height: 500px;
}

.submenu-link {
    display: block;
    padding: 12px 20px 12px 45px;
    color: #64b5f6;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.submenu-link:hover {
    background: #e3f2fd;
    color: #1976d2;
}

.submenu-link.active {
    background: #bbdefb;
    color: #1976d2;
    font-weight: 600;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #e3f2fd;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    color: #1976d2;
    font-weight: 600;
    font-size: 14px;
}

.user-role {
    color: #64b5f6;
    font-size: 12px;
}

.btn-logout-sidebar {
    background: #e3f2fd;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #1976d2;
    transition: all 0.3s ease;
}

.btn-logout-sidebar:hover {
    background: #bbdefb;
}

/* Main Content */
.main-content {
    margin-left: 280px;
    height: 100vh;
    background: #f5f9fc;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width:100%;
}

.main-content.expanded {
    margin-left: 0;
}

/* Navbar */
.navbar {
    background: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(33, 150, 243, 0.05);
    flex-shrink: 0;
}

.mobile-menu-btn {
    display: none;
    background: #e3f2fd;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #1976d2;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: #bbdefb;
}

.navbar-title h2 {
    color: #1976d2;
    font-size: 24px;
}

.navbar-actions {
    display: flex;
    gap: 10px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #e3f2fd;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #1976d2;
    transition: all 0.3s ease;
    position: relative;
}

.icon-btn:hover {
    background: #bbdefb;
}

.badge-notify {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #f44336;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
}

/* Page Content */
.page-content {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

.page-content.active {
    display: block;
}

.page-content::-webkit-scrollbar {
    width: 8px;
}

.page-content::-webkit-scrollbar-track {
    background: #f5f9fc;
}

.page-content::-webkit-scrollbar-thumb {
    background: #bbdefb;
    border-radius: 4px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.2);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.stat-icon.blue {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
}

.stat-icon.light-blue {
    background: linear-gradient(135deg, #03a9f4 0%, #0288d1 100%);
}

.stat-icon.cyan {
    background: linear-gradient(135deg, #00bcd4 0%, #0097a7 100%);
}

.stat-icon.sky {
    background: linear-gradient(135deg, #4fc3f7 0%, #29b6f6 100%);
}

.stat-info h3 {
    color: #1976d2;
    font-size: 32px;
    margin-bottom: 5px;
}

.stat-info p {
    color: #64b5f6;
    font-size: 14px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.dashboard-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.1);
}

.dashboard-card h3 {
    color: #1976d2;
    margin-bottom: 20px;
    font-size: 18px;
}

/* Tables */
.table-container {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.1);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: #e3f2fd;
}

.data-table th {
    padding: 15px;
    text-align: left;
    color: #1976d2;
    font-weight: 600;
    font-size: 14px;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid #e3f2fd;
    color: #555;
    font-size: 14px;
}

.data-table tbody tr:hover {
    background: #f5f9fc;
}

.simple-table {
    width: 100%;
    border-collapse: collapse;
}

.simple-table th {
    text-align: left;
    padding: 12px;
    color: #1976d2;
    font-weight: 600;
    font-size: 13px;
    border-bottom: 2px solid #e3f2fd;
}

.simple-table td {
    padding: 12px;
    color: #555;
    font-size: 14px;
    border-bottom: 1px solid #f5f9fc;
}

/* Badges */
.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.badge.success {
    background: #c8e6c9;
    color: #2e7d32;
}

.badge.warning {
    background: #fff9c4;
    color: #f57f17;
}

.badge.danger {
    background: #ffcdd2;
    color: #c62828;
}

.badge.blue {
    background: #bbdefb;
    color: #1976d2;
}

/* Buttons */
.btn-primary {
    padding: 12px 24px;
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(33, 150, 243, 0.4);
}

.btn-secondary {
    padding: 12px 24px;
    background: white;
    color: #2196f3;
    border: 2px solid #2196f3;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: #2196f3;
    color: white;
}

.icon-btn-small {
    background: #e3f2fd;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #1976d2;
    transition: all 0.3s ease;
    margin: 0 4px;
}

.icon-btn-small:hover {
    background: #bbdefb;
}

.btn-remove {
    background: #ffcdd2;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #c62828;
    transition: all 0.3s ease;
}

.btn-remove:hover {
    background: #ef9a9a;
}

/* Forms */
.form-container {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.1);
    max-width: 1000px;
}

.form-container h3 {
    color: #1976d2;
    margin-bottom: 25px;
    font-size: 22px;
}

.form-container h4 {
    color: #1976d2;
    margin: 25px 0 15px;
    font-size: 18px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #1976d2;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #bbdefb;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #f5f9fc;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2196f3;
    background: white;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.form-group textarea {
    resize: vertical;
    font-family: inherit;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 25px;
}

/* Items Section */
.items-section {
    background: #f5f9fc;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.items-table,
.receive-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.items-table th,
.receive-table th {
    text-align: left;
    padding: 12px;
    color: #1976d2;
    font-weight: 600;
    font-size: 13px;
    border-bottom: 2px solid #e3f2fd;
}

.items-table td,
.receive-table td {
    padding: 12px;
}

.items-table input,
.items-table select,
.receive-table input,
.receive-table select {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #bbdefb;
    border-radius: 8px;
    font-size: 14px;
    background: white;
}

.items-table input:focus,
.items-table select:focus,
.receive-table input:focus,
.receive-table select:focus {
    outline: none;
    border-color: #2196f3;
}

.full-width {
    width: 100%;
}

/* Rental/Return Summary */
.rental-summary,
.return-summary {
    background: #e3f2fd;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.rental-summary h4,
.return-summary h4 {
    color: #1976d2;
    margin-bottom: 15px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #bbdefb;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row.total {
    font-size: 18px;
    font-weight: 700;
    color: #1976d2;
    border-top: 2px solid #2196f3;
    padding-top: 15px;
    margin-top: 10px;
}

.summary-value {
    color: #1976d2;
    font-weight: 600;
}

/* Rental Details Card */
.rental-details-card {
    background: #e3f2fd;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.rental-details-card h4 {
    color: #1976d2;
    margin-bottom: 15px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.detail-row span {
    color: #64b5f6;
}

.detail-row strong {
    color: #1976d2;
}

/* Alert List */
.alert-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 10px;
    background: #fff9c4;
    border-left: 4px solid #f57f17;
}

.alert-item svg {
    color: #f57f17;
}

.alert-item strong {
    color: #1976d2;
    font-size: 14px;
}

.alert-item p {
    color: #666;
    font-size: 13px;
    margin-top: 4px;
}

/* Page Header Actions */
.page-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 20px;
}

.page-header-actions h3 {
    color: #1976d2;
    font-size: 24px;
}

.page-header-actions p {
    color: #64b5f6;
    font-size: 14px;
}

/* Table Controls */
.table-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: #f5f9fc;
    border-radius: 10px;
    flex: 1;
    min-width: 250px;
}

.search-box svg {
    color: #64b5f6;
}

.search-box input {
    border: none;
    background: none;
    outline: none;
    flex: 1;
    color: #1976d2;
    font-size: 14px;
}

.filter-select {
    padding: 10px 15px;
    background: #f5f9fc;
    border: 2px solid #bbdefb;
    border-radius: 10px;
    color: #1976d2;
    cursor: pointer;
    font-size: 14px;
}

/* Stock Summary Grid */
.stock-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stock-summary-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.1);
    transition: all 0.3s ease;
}

.stock-summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.2);
}

.stock-summary-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.stock-summary-icon.green {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
}

.stock-summary-icon.orange {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

.stock-summary-icon.red {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

.stock-summary-icon.blue {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
}

.stock-summary-info h4 {
    color: #1976d2;
    font-size: 16px;
    margin-bottom: 8px;
}

.stock-count {
    color: #1976d2;
    font-size: 28px;
    font-weight: 700;
    margin: 5px 0;
}

.stock-percentage {
    color: #64b5f6;
    font-size: 13px;
}

/* Stock History Section */
.stock-history-section {
    margin-top: 30px;
}

.stock-history-section h3 {
    color: #1976d2;
    font-size: 20px;
    margin-bottom: 20px;
}

/* Animations */
@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-10px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(10px);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-280px);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        width: 100vw;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .sidebar-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 15px 20px;
    }

    .page-content {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .page-header-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .table-container {
        overflow-x: auto;
    }
}
