/* UNISEL Cafeteria Management System - Main Stylesheet */

:root {
    --primary-color: #f7941d;
    --primary-dark: #e07b00;
    --secondary-color: #2c3e50;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #3498db;
    --light-bg: #f8f9fa;
    --dark-bg: #343a40;
    --border-color: #dee2e6;
    --text-muted: #6c757d;
    --sidebar-width: 260px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--secondary-color);
}

/* Login Page Styles */
.login-page {
    min-height: 100vh;
    background: url('../images/food-bg.jpg') center center / cover no-repeat fixed;
}

.login-container {
    display: flex;
    min-height: 100vh;
}

.login-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: white;
    background: rgba(0, 0, 0, 0.55);
    position: relative;
}

.login-branding {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    width: 150px;
    height: auto;
    margin-bottom: 20px;
    filter: brightness(0) invert(1);
}

.login-branding h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.login-branding p {
    font-size: 1.2rem;
    opacity: 0.9;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.login-features {
    max-width: 350px;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.feature-item i {
    font-size: 1.5rem;
    margin-right: 15px;
    width: 40px;
    text-align: center;
}

.feature-item span {
    font-size: 1rem;
}

.login-right {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
    border-radius: 30px 0 0 30px;
}

.login-box {
    width: 100%;
    max-width: 450px;
    padding: 40px;
}

.login-box h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.login-options {
    margin-top: 30px;
}

.login-section {
    padding: 25px;
    background: var(--light-bg);
    border-radius: 15px;
    margin-bottom: 20px;
}

.login-section h5 {
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 20px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-google:hover {
    background: var(--light-bg);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-google img {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

.divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    padding: 0 15px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Dashboard Layout */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--secondary-color) 0%, #1a252f 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* Vendor Sidebar - Green Theme */
.sidebar.vendor-sidebar {
    background: linear-gradient(180deg, #1e7e34 0%, #155724 100%);
}

.sidebar.vendor-sidebar .sidebar-header h4 {
    color: #90EE90;
}

.sidebar.vendor-sidebar .sidebar-menu a:hover,
.sidebar.vendor-sidebar .sidebar-menu a.active {
    background: rgba(144, 238, 144, 0.1);
    color: #90EE90;
    border-left-color: #90EE90;
}

/* User Sidebar - Orange Theme (default) */
.sidebar.user-sidebar {
    background: linear-gradient(180deg, var(--secondary-color) 0%, #1a252f 100%);
}

.sidebar.user-sidebar .sidebar-header h4 {
    color: var(--primary-color);
}

.sidebar.user-sidebar .sidebar-menu a:hover,
.sidebar.user-sidebar .sidebar-menu a.active {
    background: rgba(247, 148, 29, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

/* Admin Sidebar - Blue Theme */
.sidebar.admin-sidebar {
    background: linear-gradient(180deg, #1a3a5c 0%, #0d1f33 100%);
}

.sidebar.admin-sidebar .sidebar-header h4 {
    color: #5dade2;
}

.sidebar.admin-sidebar .sidebar-menu a:hover,
.sidebar.admin-sidebar .sidebar-menu a.active {
    background: rgba(93, 173, 226, 0.1);
    color: #5dade2;
    border-left-color: #5dade2;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    width: 80px;
    height: auto;
    margin-bottom: 10px;
}

.sidebar-header h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--primary-color);
}

.sidebar-header p {
    font-size: 0.75rem;
    opacity: 0.7;
    margin: 0;
}

.sidebar-menu {
    padding: 20px 0;
}

.menu-label {
    padding: 10px 20px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(247, 148, 29, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.sidebar-menu a i {
    width: 35px;
    font-size: 1.1rem;
}

.sidebar-menu a span {
    font-size: 0.95rem;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* Top Navbar */
.top-navbar {
    background: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 999;
}

.page-title h4 {
    margin: 0;
    font-weight: 600;
    color: var(--secondary-color);
}

.page-title p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.navbar-actions .dropdown {
    position: relative;
}

.notification-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.notification-btn:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 10px;
    pointer-events: none;
    z-index: 1;
}

.user-dropdown {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 5px 15px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.user-dropdown:hover {
    background: var(--light-bg);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.user-info {
    text-align: left;
}

.user-info h6 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
}

.user-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Content Area */
.content-area {
    padding: 30px;
}

/* Cards */
.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: none;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
}

.stat-card .icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.stat-card .icon.primary {
    background: rgba(247, 148, 29, 0.1);
    color: var(--primary-color);
}

.stat-card .icon.success {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
}

.stat-card .icon.info {
    background: rgba(52, 152, 219, 0.1);
    color: var(--info-color);
}

.stat-card .icon.warning {
    background: rgba(243, 156, 18, 0.1);
    color: var(--warning-color);
}

.stat-card .icon.danger {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger-color);
}

.stat-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--secondary-color);
}

.stat-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Content Cards */
.content-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
}

.card-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
}

.card-header h5 {
    margin: 0;
    font-weight: 600;
    color: var(--secondary-color);
}

.card-body {
    padding: 25px;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    color: var(--secondary-color);
    border-bottom: 2px solid var(--border-color);
    padding: 15px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    padding: 15px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background: var(--light-bg);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.75rem;
}

/* Forms */
.form-control, .form-select {
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(247, 148, 29, 0.1);
}

.form-label {
    font-weight: 500;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.input-group-text {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px 0 0 10px;
}

/* Menu Items Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.menu-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.menu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
}

.menu-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.menu-card-body {
    padding: 20px;
}

.menu-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--secondary-color);
}

.menu-card-vendor {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.menu-card-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.menu-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Order Status */
.order-status {
    display: flex;
    justify-content: space-between;
    margin: 30px 0;
    position: relative;
}

.order-status::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--border-color);
    z-index: 1;
}

.status-step {
    text-align: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.status-step .icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 1rem;
    color: var(--text-muted);
}

.status-step.completed .icon {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.status-step.active .icon {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(247, 148, 29, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(247, 148, 29, 0); }
    100% { box-shadow: 0 0 0 0 rgba(247, 148, 29, 0); }
}

.status-step span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.status-step.completed span,
.status-step.active span {
    color: var(--secondary-color);
    font-weight: 500;
}

/* Chatbot */
.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(247, 148, 29, 0.4);
    transition: all 0.3s ease;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.chatbot-window.active {
    display: flex;
}

.chatbot-header {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.chatbot-header img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: white;
    padding: 5px;
}

.chatbot-header h6 {
    margin: 0;
    font-weight: 600;
}

.chatbot-header p {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.9;
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.chat-message {
    margin-bottom: 15px;
    display: flex;
}

.chat-message.bot {
    justify-content: flex-start;
}

.chat-message.user {
    justify-content: flex-end;
}

.chat-bubble {
    max-width: 80%;
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.chat-message.bot .chat-bubble {
    background: var(--light-bg);
    color: var(--secondary-color);
    border-bottom-left-radius: 5px;
}

.chat-message.user .chat-bubble {
    background: var(--primary-color);
    color: white;
    border-bottom-right-radius: 5px;
}

.gemini-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    padding: 4px 8px;
    background: linear-gradient(135deg, #4285f4, #9b72cb, #d96570);
    color: white;
    font-size: 9px;
    font-weight: 600;
    border-radius: 10px;
    white-space: nowrap;
}

.gemini-badge i {
    font-size: 9px;
}

.chatbot-input {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}

.chatbot-input input {
    flex: 1;
    padding: 12px 18px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    outline: none;
}

.chatbot-input input:focus {
    border-color: var(--primary-color);
}

.chatbot-input button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary-color);
    border: none;
    color: white;
    cursor: pointer;
}

/* Announcements */
.announcement-card {
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 15px;
    border-left: 4px solid;
}

.announcement-card.info {
    background: rgba(52, 152, 219, 0.1);
    border-left-color: var(--info-color);
}

.announcement-card.warning {
    background: rgba(243, 156, 18, 0.1);
    border-left-color: var(--warning-color);
}

.announcement-card.promotion {
    background: rgba(39, 174, 96, 0.1);
    border-left-color: var(--success-color);
}

.announcement-card.urgent {
    background: rgba(231, 76, 60, 0.1);
    border-left-color: var(--danger-color);
}

/* Profile Page */
.profile-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 40px;
    border-radius: 15px;
    color: white;
    text-align: center;
    margin-bottom: 30px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    object-fit: cover;
    margin-bottom: 15px;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.profile-email {
    opacity: 0.9;
    margin-bottom: 15px;
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .login-container {
        flex-direction: column;
    }
    
    .login-left {
        padding: 30px;
    }
    
    .login-right {
        border-radius: 30px 30px 0 0;
    }
}

@media (max-width: 768px) {
    .content-area {
        padding: 15px;
    }
    
    .top-navbar {
        padding: 15px;
    }
    
    .chatbot-window {
        width: 100%;
        right: -15px;
        bottom: 70px;
        border-radius: 20px 20px 0 0;
    }
    
    .menu-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 30px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 15px;
    text-decoration: none;
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

.quick-action-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
}

.quick-action-btn i {
    font-size: 2rem;
    margin-bottom: 10px;
}

.quick-action-btn span {
    font-weight: 500;
}

/* Modal Styles */
.modal-content {
    border-radius: 20px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 20px 25px;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 15px 25px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 4rem;
    color: var(--border-color);
    margin-bottom: 20px;
}

.empty-state h5 {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-muted);
}

/* Cart */
.cart-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    margin-right: 15px;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-price {
    color: var(--primary-color);
    font-weight: 600;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: white;
    cursor: pointer;
}

.quantity-btn:hover {
    background: var(--light-bg);
}

/* Search */
.search-box {
    position: relative;
}

.search-box input {
    padding-left: 45px;
    border-radius: 25px;
}

.search-box i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* Filter Pills */
.filter-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.filter-pill {
    padding: 8px 20px;
    border-radius: 25px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-pill:hover,
.filter-pill.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Logo in sidebar */
.sidebar-logo-container {
    padding: 15px;
    text-align: center;
}

.sidebar-logo-img {
    max-width: 100px;
    height: auto;
}
