/* ==================== GLOBAL STYLES & FONTS ==================== */ @import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&display=swap'); :root { --primary-blue: #1C3E6A; /* สีน้ำเงินเข้มสำหรับ Sidebar */ --secondary-blue: #007bff; --dark-text: #333; --light-text: #ffffff; --bg-light: #f4f6f9; --kpi-green: #28a745; --kpi-blue: #007bff; --kpi-yellow: #ffc107; --kpi-red: #dc3545; --border-color: #e9ecef; } * { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Montserrat', sans-serif; } body { background-color: var(--bg-light); color: var(--dark-text); font-size: 14px; } /* ==================== APP CONTAINER LAYOUT ==================== */ .app-container { display: grid; grid-template-columns: 260px 1fr; /* Sidebar width and Main content */ min-height: 100vh; } /* ==================== SIDEBAR STYLES ==================== */ .sidebar { background-color: var(--primary-blue); color: var(--light-text); padding: 15px 0; box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1); } .logo-area { font-size: 20px; font-weight: 800; padding: 0 20px 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); } .logo-area i { margin-right: 10px; color: var(--kpi-blue); } .summary-card { display: flex; flex-direction: column; padding: 20px; background: rgba(0, 0, 0, 0.1); margin: 15px 10px; border-radius: 5px; } .stat-item { display: flex; justify-content: space-between; align-items: center; padding: 3px 0; } .stat-item .value { font-size: 16px; font-weight: 700; } .stat-item .label { font-size: 12px; opacity: 0.8; } .critical { color: var(--kpi-red); } .uptime { color: var(--kpi-green); } .efficiency { color: var(--kpi-yellow); } .nav-heading { text-transform: uppercase; font-size: 10px; font-weight: 600; color: rgba(255, 255, 255, 0.5); padding: 10px 20px 5px; } .main-nav .nav-item { display: flex; align-items: center; padding: 10px 20px; color: var(--light-text); text-decoration: none; transition: background-color 0.2s; font-size: 13px; } .main-nav .nav-item:hover, .main-nav .nav-item.active { background-color: rgba(255, 255, 255, 0.1); } .main-nav .nav-item i { margin-right: 10px; width: 15px; } .main-nav .nav-item .badge { margin-left: auto; background-color: var(--kpi-red); color: white; padding: 2px 6px; border-radius: 12px; font-size: 10px; font-weight: 600; } .main-nav .nav-item .label-soon { margin-left: auto; font-size: 10px; color: rgba(255, 255, 255, 0.5); } .system-status { padding: 10px 20px; } .system-status-heading { margin-top: 20px; } .status-line { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; } .status-line i { margin-right: 10px; opacity: 0.7; } .status-badge { padding: 2px 8px; border-radius: 15px; font-size: 11px; font-weight: 600; } .healthy { background-color: var(--kpi-green); color: white; } .optimal { background-color: var(--kpi-blue); color: white; } .critical { background-color: var(--kpi-red); color: white; } .user-profile-sidebar { display: flex; align-items: center; padding: 15px 20px; border-top: 1px solid rgba(255, 255, 255, 0.1); margin-top: 50px; /* เพื่อจัดให้อยู่ด้านล่างสุด */ } .avatar-sm { width: 30px; height: 30px; background-color: #fff; color: var(--primary-blue); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; margin-right: 10px; font-size: 12px; } .user-info .name { font-weight: 600; font-size: 13px; } .user-info .role { font-size: 11px; opacity: 0.7; } /* ==================== MAIN CONTENT & HEADER ==================== */ .main-content { padding: 20px; } /* TOP BAR (Header) */ .top-bar { display: flex; justify-content: space-between; align-items: center; padding-bottom: 20px; border-bottom: 1px solid var(--border-color); margin-bottom: 20px; } .title-section h2 { font-size: 18px; font-weight: 700; } .title-section p { font-size: 12px; color: #666; } .status-bar { display: flex; align-items: center; gap: 15px; } .system-online { color: var(--kpi-green); font-weight: 600; font-size: 13px; } .system-online i { font-size: 8px; margin-right: 5px; } .last-sync { font-size: 12px; color: #666; } .search-box { display: flex; align-items: center; background-color: white; padding: 5px 10px; border: 1px solid var(--border-color); border-radius: 20px; width: 350px; } .search-box i { color: #aaa; margin-right: 10px; } .search-box input { border: none; outline: none; flex-grow: 1; font-size: 13px; } .clear-search { cursor: pointer; } .uptime-stat { font-size: 13px; font-weight: 600; color: var(--kpi-green); } .header-icons i { font-size: 18px; color: #666; margin: 0 5px; cursor: pointer; } .user-profile-header { display: flex; align-items: center; gap: 10px; border-left: 1px solid var(--border-color); padding-left: 15px; } .user-name-role { line-height: 1.2; } .user-name-role .name { font-size: 14px; font-weight: 600; } .user-name-role .role { font-size: 11px; color: #999; } /* DASHBOARD ACTIONS */ .dashboard-overview-section h3 { font-size: 16px; font-weight: 600; margin-bottom: 15px; } .action-buttons { display: flex; gap: 10px; margin-bottom: 25px; } .btn { padding: 8px 15px; border: none; border-radius: 4px; font-weight: 600; cursor: pointer; transition: background-color 0.2s; font-size: 13px; } .btn i { margin-right: 5px; } .primary { background-color: var(--kpi-blue); color: white; } .secondary { background-color: white; color: var(--dark-text); border: 1px solid var(--border-color); } .primary:hover { background-color: #0056b3; } .secondary:hover { background-color: var(--border-color); } /* ==================== KPI CARDS GRID ==================== */ .kpi-cards-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 30px; } .kpi-card { background-color: white; border-radius: 8px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); padding: 15px; border-top: 4px solid transparent; } .green-kpi { border-top-color: var(--kpi-green); } .blue-kpi { border-top-color: var(--kpi-blue); } .yellow-kpi { border-top-color: var(--kpi-yellow); } .red-kpi { border-top-color: var(--kpi-red); } .kpi-header { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #666; margin-bottom: 15px; } .kpi-value-main { font-size: 36px; font-weight: 800; line-height: 1; margin-bottom: 10px; } .kpi-trend { display: inline-block; font-size: 12px; font-weight: 600; margin-left: 10px; } .green-trend { color: var(--kpi-green); } .blue-trend { color: var(--kpi-blue); } .yellow-trend { color: #ff9800; } /* ส้มเข้มกว่า yellow-kpi */ .red-trend { color: var(--kpi-red); } .kpi-trend small { font-weight: 400; color: #999; margin-left: 5px; } .kpi-footer { font-size: 13px; font-weight: 600; border-top: 1px solid var(--border-color); padding-top: 10px; margin-top: 10px; } .kpi-card .warning-text { font-size: 12px; color: #999; margin-top: 5px; } .kpi-card.red-kpi .warning-text { color: var(--kpi-red); font-weight: 600; } .kpi-card.yellow-kpi .warning-text { color: var(--kpi-yellow); font-weight: 600; } /* ==================== LOWER SECTIONS GRID ==================== */ .lower-sections-grid { display: grid; grid-template-columns: 2fr 1fr; /* Equipment Status (2 ส่วน) System Alerts (1 ส่วน) */ gap: 20px; } .section-card { background-color: white; border-radius: 8px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); padding: 20px; } .section-header i { margin-right: 5px; color: var(--kpi-blue); } .section-header h4 { font-size: 16px; font-weight: 700; } .section-header p { font-size: 12px; color: #666; margin-top: 5px; margin-bottom: 15px; } /* Equipment Status */ .status-search-bar { display: flex; align-items: center; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; margin-bottom: 15px; } .status-search-bar i { color: #aaa; margin-right: 10px; } .status-search-bar input { border: none; outline: none; flex-grow: 1; font-size: 13px; } .all-equipment-dropdown { font-size: 12px; color: var(--kpi-blue); cursor: pointer; } .all-equipment-dropdown i { margin-left: 5px; } .equipment-summary-stats { display: flex; justify-content: space-between; margin-bottom: 20px; } .stat-box { text-align: center; padding: 15px 10px; border-radius: 5px; flex: 1; margin: 0 5px; color: white; } .stat-box h2 { font-size: 24px; font-weight: 800; line-height: 1; } .stat-box p { font-size: 12px; font-weight: 600; margin-top: 5px; } .total { background-color: #6c757d; } /* Grey */ .operational { background-color: var(--kpi-green); } .maintenance { background-color: #ff9800; } /* Orange */ .offline { background-color: var(--kpi-red); } .equipment-cards-list { display: flex; gap: 15px; } .eq-card { flex: 1; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; position: relative; padding: 10px; text-align: center; } .eq-card h3 { font-size: 14px; margin-top: 10px; } .eq-card img { width: 100%; height: 100px; object-fit: cover; border-radius: 5px; } .eq-status { position: absolute; top: 15px; left: 15px; padding: 2px 8px; border-radius: 12px; font-size: 10px; color: white; font-weight: 600; } .operational-bg { background-color: var(--kpi-green); } .maintenance-bg { background-color: #ff9800; } .operational-border { border-top: 3px solid var(--kpi-green); } .maintenance-border { border-top: 3px solid #ff9800; } /* System Alerts */ .alert-list { display: flex; flex-direction: column; gap: 15px; } .alert-item { display: flex; gap: 10px; padding: 10px 0; border-left: 3px solid transparent; } .red-alert { border-left-color: var(--kpi-red); } .yellow-alert { border-left-color: var(--kpi-yellow); } .blue-alert { border-left-color: var(--kpi-blue); } .alert-item i { font-size: 18px; padding-top: 5px; } .red-alert i { color: var(--kpi-red); } .yellow-alert i { color: #ff9800; } .blue-alert i { color: var(--kpi-blue); } .alert-content h4 { font-size: 14px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; margin-bottom: 3px; } .alert-content p { font-size: 12px; color: #666; line-height: 1.3; } .alert-content small { font-size: 10px; color: #999; margin-top: 5px; display: block; } .badge.active-badge { background-color: var(--kpi-red); color: white; padding: 2px 8px; border-radius: 12px; font-size: 10px; font-weight: 600; } .yellow-alert .badge.active-badge { background-color: var(--kpi-yellow); } .blue-alert .badge.active-badge { background-color: var(--kpi-blue); }