diff --git a/support-portal-frontend/angular.json b/support-portal-frontend/angular.json index a02ce94..a1a263e 100644 --- a/support-portal-frontend/angular.json +++ b/support-portal-frontend/angular.json @@ -46,13 +46,13 @@ "budgets": [ { "type": "initial", - "maximumWarning": "500kb", - "maximumError": "1mb" + "maximumWarning": "2mb", + "maximumError": "5mb" }, { "type": "anyComponentStyle", - "maximumWarning": "2kb", - "maximumError": "4kb" + "maximumWarning": "6kb", + "maximumError": "15kb" } ], "fileReplacements": [ @@ -126,7 +126,8 @@ "src/assets/assets2" ], "styles": [ - "src/styles.css" + "src/styles.css", + "src/app/common-styles.css" ], "scripts": [ "node_modules/bootstrap/dist/js/bootstrap.bundle.min.js" diff --git a/support-portal-frontend/src/app/common-styles.css b/support-portal-frontend/src/app/common-styles.css new file mode 100644 index 0000000..9b764fb --- /dev/null +++ b/support-portal-frontend/src/app/common-styles.css @@ -0,0 +1,1031 @@ +/* CSS Variables for Common Values */ +:root { + --bg-primary: #f8f9fa; + --bg-white: white; + --bg-gray-50: #f9fafb; + --bg-gray-100: #f3f4f6; + --bg-gray-200: #e5e7eb; + + --text-primary: #1a1a1a; + --text-secondary: #374151; + --text-tertiary: #6b7280; + --text-muted: #9ca3af; + + --border-color: #e5e7eb; + --border-color-light: #f3f4f6; + --border-color-dark: #d1d5db; + + --blue-50: #eff6ff; + --blue-100: #dbeafe; + --blue-500: #3b82f6; + --blue-600: #2563eb; + --blue-700: #1e40af; + + --red-50: #fef2f2; + --red-100: #fee2e2; + --red-600: #dc2626; + --red-900: #991b1b; + + --green-50: #f0fdf4; + --green-100: #d1fae5; + --green-700: #166534; + --green-900: #065f46; + + --orange-50: #fff7ed; + --orange-500: #f97316; + + --yellow-50: #fef3c7; + --yellow-900: #92400e; + + --sidebar-width: 260px; + --radius-sm: 4px; + --radius-md: 6px; + --radius-lg: 8px; + --radius-xl: 12px; + + --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1); + --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1); + --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); + + --transition-base: all 0.2s ease; +} + +/* Common Layout */ +.layout { + display: flex; + min-height: 100vh; + background: var(--bg-primary); +} + +.sidebar { + position: fixed; + left: 0; + top: 0; + height: 100vh; + width: var(--sidebar-width); + z-index: 1000; +} + +.content { + margin-left: var(--sidebar-width); + flex: 1; + padding: 32px; + width: calc(100% - var(--sidebar-width)); + max-width: 1600px; +} + +/* Header Section */ +.header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 32px; + gap: 20px; +} + +.header-left { + flex: 1; +} + +.page-title { + font-size: 28px; + font-weight: 600; + color: var(--text-primary); + margin: 0 0 4px 0; + letter-spacing: -0.5px; +} + +.page-subtitle { + font-size: 14px; + color: var(--text-tertiary); + margin: 0; +} + +.header-actions { + display: flex; + gap: 12px; + align-items: center; +} + +/* Search Box */ +.search-box { + position: relative; + display: flex; + align-items: center; +} + +.search-box i { + position: absolute; + left: 16px; + color: var(--text-tertiary); + font-size: 14px; +} + +.search-input { + padding: 10px 16px 10px 42px; + border: 1px solid var(--border-color-dark); + border-radius: var(--radius-lg); + font-size: 14px; + color: var(--text-primary); + width: 300px; + transition: var(--transition-base); +} + +.search-input:focus { + outline: none; + border-color: var(--blue-500); + box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); +} + +.search-input::placeholder { + color: var(--text-muted); +} + +/* Buttons */ +.btn { + display: flex; + align-items: center; + gap: 8px; + padding: 10px 20px; + border-radius: var(--radius-lg); + font-size: 14px; + font-weight: 500; + cursor: pointer; + transition: var(--transition-base); + border: none; +} + +.btn-primary { + background: var(--blue-500); + color: white; +} + +.btn-primary:hover:not(:disabled) { + background: var(--blue-600); + transform: translateY(-1px); +} + +.btn-primary:disabled { + background: var(--text-muted); + cursor: not-allowed; + opacity: 0.6; +} + +.btn-secondary { + background: var(--bg-white); + color: var(--text-secondary); + border: 1px solid var(--border-color); +} + +.btn-secondary:hover { + background: var(--bg-gray-50); + border-color: var(--border-color-dark); +} + +.btn-info { + background: #0ea5e9; + color: white; +} + +.btn-info:hover { + background: #0284c7; + transform: translateY(-1px); +} + +.btn-cancel { + background: var(--bg-gray-100); + color: var(--text-tertiary); +} + +.btn-cancel:hover { + background: var(--border-color); +} + +.btn-refresh { + background: var(--bg-white); + color: var(--text-tertiary); + border: 1px solid var(--border-color); + padding: 10px 16px; +} + +.btn-refresh:hover { + background: var(--bg-gray-50); + color: var(--blue-500); +} + +/* Action Buttons */ +.action-buttons { + display: flex; + gap: 8px; +} + +.btn-action { + width: 36px; + height: 36px; + border-radius: var(--radius-md); + border: 1px solid var(--border-color); + background: var(--bg-white); + color: var(--text-tertiary); + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; + transition: var(--transition-base); +} + +.btn-action:hover { + transform: translateY(-2px); + box-shadow: var(--shadow-sm); +} + +.btn-edit:hover { + background: var(--blue-50); + border-color: var(--blue-500); + color: var(--blue-500); +} + +.btn-delete:hover { + background: var(--red-50); + border-color: var(--red-600); + color: var(--red-600); +} + +/* Stats Bar */ +.stats-bar { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); + gap: 20px; + margin-bottom: 32px; +} + +.stat-item { + background: var(--bg-white); + border: 1px solid var(--border-color); + border-radius: var(--radius-xl); + padding: 20px; + display: flex; + align-items: center; + gap: 16px; +} + +.stat-icon { + width: 48px; + height: 48px; + border-radius: 10px; + display: flex; + align-items: center; + justify-content: center; + font-size: 20px; + flex-shrink: 0; +} + +.stat-icon-blue { + background: var(--blue-50); + color: var(--blue-500); +} + +.stat-icon-orange { + background: var(--orange-50); + color: var(--orange-500); +} + +.stat-icon-green { + background: var(--green-50); + color: #22c55e; +} + +.stat-details { + display: flex; + flex-direction: column; + gap: 4px; +} + +.stat-label { + font-size: 13px; + color: var(--text-tertiary); + font-weight: 500; +} + +.stat-value { + font-size: 28px; + font-weight: 700; + color: var(--text-primary); + line-height: 1; +} + +/* Tables */ +.table-wrapper { + background: var(--bg-white); + border: 1px solid var(--border-color); + border-radius: var(--radius-xl); + overflow: hidden; +} + +.table { + width: 100%; + border-collapse: collapse; +} + +.table thead { + background: var(--bg-gray-50); + border-bottom: 1px solid var(--border-color); +} + +.table thead th { + padding: 16px 20px; + text-align: left; + font-size: 13px; + font-weight: 600; + color: var(--text-secondary); + text-transform: uppercase; + letter-spacing: 0.5px; +} + +.table tbody tr { + border-bottom: 1px solid var(--border-color-light); + transition: background 0.2s ease; +} + +.table tbody tr:last-child { + border-bottom: none; +} + +.table tbody tr:hover { + background: var(--bg-gray-50); +} + +.table tbody td { + padding: 16px 20px; + font-size: 14px; + color: var(--text-secondary); + vertical-align: middle; +} + +/* Badges */ +.badge { + display: inline-block; + padding: 4px 12px; + border-radius: var(--radius-md); + font-size: 12px; + font-weight: 600; +} + +.badge-blue { + background: var(--blue-100); + color: var(--blue-700); +} + +.badge-gray { + background: var(--bg-gray-100); + color: #4b5563; +} + +.badge-green { + background: var(--green-100); + color: var(--green-900); +} + +.badge-red { + background: var(--red-100); + color: var(--red-900); +} + +.badge-yellow { + background: var(--yellow-50); + color: var(--yellow-900); +} + +.badge-purple { + background: #e0e7ff; + color: #3730a3; +} + +/* Status Badge */ +.status-badge { + display: inline-flex; + align-items: center; + gap: 6px; + padding: 6px 12px; + border-radius: var(--radius-md); + font-size: 12px; + font-weight: 600; +} + +.status-active { + background: var(--green-100); + color: var(--green-900); +} + +.status-inactive { + background: var(--red-100); + color: var(--red-900); +} + +/* Forms */ +.form-container { + animation: fadeIn 0.3s ease; +} + +@keyframes fadeIn { + from { + opacity: 0; + transform: translateY(10px); + } + to { + opacity: 1; + transform: translateY(0); + } +} + +.form-card { + background: var(--bg-white); + border: 1px solid var(--border-color); + border-radius: var(--radius-xl); + overflow: hidden; +} + +.form-card-header { + padding: 24px 32px; + background: var(--bg-gray-50); + border-bottom: 1px solid var(--border-color); +} + +.form-card-header h3 { + margin: 0; + font-size: 18px; + font-weight: 600; + color: var(--text-primary); +} + +.form-card-body { + padding: 32px; +} + +.form-section { + margin-bottom: 32px; + padding-bottom: 32px; + border-bottom: 1px solid var(--border-color-light); +} + +.form-section:last-of-type { + border-bottom: none; + padding-bottom: 0; +} + +.section-title { + font-size: 16px; + font-weight: 600; + color: var(--text-primary); + margin: 0 0 20px 0; + display: flex; + align-items: center; + gap: 8px; +} + +.form-row { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); + gap: 20px; + margin-bottom: 20px; +} + +.form-row:last-child { + margin-bottom: 0; +} + +.form-group { + display: flex; + flex-direction: column; + margin-bottom: 20px; +} + +.form-group label { + display: flex; + align-items: center; + gap: 8px; + font-size: 14px; + font-weight: 600; + color: var(--text-primary); + margin-bottom: 8px; +} + +.form-group label i { + color: var(--text-tertiary); + font-size: 14px; +} + +.form-group label small { + font-weight: 400; + color: var(--text-tertiary); +} + +.form-input, +.form-select, +.form-textarea { + width: 100%; + padding: 12px 16px; + border: 1px solid var(--border-color-dark); + border-radius: var(--radius-lg); + font-size: 14px; + color: var(--text-primary); + transition: var(--transition-base); + background: var(--bg-white); + font-family: inherit; +} + +.form-input:focus, +.form-select:focus, +.form-textarea:focus { + outline: none; + border-color: var(--blue-500); + box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); +} + +.form-input:disabled, +.form-select:disabled { + background: var(--bg-gray-100); + color: var(--text-muted); + cursor: not-allowed; +} + +.form-input::placeholder, +.form-textarea::placeholder { + color: var(--text-muted); +} + +.form-textarea { + resize: vertical; + min-height: 100px; +} + +.form-hint { + display: block; + font-size: 12px; + color: var(--text-tertiary); + margin-top: 6px; +} + +.form-text { + display: block; + margin-top: 0.5rem; + font-size: 0.875rem; +} + +.text-muted { + color: #6c757d; +} + +.error-message { + display: flex; + align-items: center; + gap: 6px; + margin-top: 8px; + font-size: 13px; + color: var(--red-600); +} + +.error-message i { + font-size: 14px; +} + +.form-actions { + display: flex; + gap: 12px; + padding-top: 24px; +} + +/* File Upload */ +.file-upload-wrapper { + position: relative; +} + +.file-input { + position: absolute; + opacity: 0; + width: 0; + height: 0; +} + +.file-label { + display: flex; + align-items: center; + gap: 12px; + padding: 12px 16px; + border: 2px dashed var(--border-color-dark); + border-radius: var(--radius-lg); + cursor: pointer; + transition: var(--transition-base); + background: #fafafa; +} + +.file-label:hover { + border-color: var(--blue-500); + background: var(--blue-50); +} + +.file-label i { + font-size: 20px; + color: var(--text-tertiary); +} + +.file-label span { + font-size: 14px; + color: var(--text-secondary); +} + +.file-label.disabled { + opacity: 0.6; + cursor: not-allowed; + background-color: #f5f5f5; + color: #999; + pointer-events: none; +} + +.file-label.disabled:hover { + background-color: #f5f5f5; + border-color: #ddd; +} + +/* Checkbox */ +.checkbox-wrapper { + display: flex; + align-items: center; + margin-bottom: 12px; +} + +.checkbox-wrapper:last-child { + margin-bottom: 0; +} + +.checkbox-input { + position: absolute; + opacity: 0; + width: 0; + height: 0; +} + +.checkbox-label { + display: flex; + align-items: center; + gap: 12px; + cursor: pointer; + user-select: none; +} + +.checkbox-custom { + width: 20px; + height: 20px; + border: 2px solid var(--border-color-dark); + border-radius: var(--radius-sm); + display: flex; + align-items: center; + justify-content: center; + transition: var(--transition-base); + background: var(--bg-white); +} + +.checkbox-input:checked + .checkbox-label .checkbox-custom { + background: var(--blue-500); + border-color: var(--blue-500); +} + +.checkbox-input:checked + .checkbox-label .checkbox-custom::after { + content: '\f00c'; + font-family: 'Font Awesome 5 Free'; + font-weight: 900; + color: white; + font-size: 12px; +} + +.checkbox-input:disabled + .checkbox-label { + opacity: 0.5; + cursor: not-allowed; +} + +.checkbox-text { + display: flex; + align-items: center; + gap: 8px; + font-size: 14px; + font-weight: 500; + color: var(--text-secondary); +} + +.checkbox-text i { + color: var(--text-tertiary); + font-size: 14px; +} + +.checkbox-text small { + font-weight: 400; + color: var(--text-tertiary); +} + +/* Empty State */ +.empty-state { + background: var(--bg-white); + border: 1px solid var(--border-color); + border-radius: var(--radius-xl); + padding: 60px 20px; + text-align: center; +} + +.empty-icon { + width: 80px; + height: 80px; + margin: 0 auto 20px; + background: var(--bg-gray-100); + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; +} + +.empty-icon i { + font-size: 36px; + color: var(--text-muted); +} + +.empty-state h3 { + font-size: 20px; + font-weight: 600; + color: var(--text-primary); + margin: 0 0 8px 0; +} + +.empty-state p { + font-size: 14px; + color: var(--text-tertiary); + margin: 0 0 24px 0; +} + +.empty-state p:last-child { + margin-bottom: 0; +} + +/* Modal Styles */ +.modal-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.5); + display: none; + align-items: center; + justify-content: center; + z-index: 2000; + animation: fadeIn 0.2s ease; + backdrop-filter: blur(2px); +} + +.modal-overlay.show { + display: flex; +} + +.modal-container { + background: var(--bg-white); + border-radius: var(--radius-xl); + width: 90%; + max-width: 600px; + max-height: 90vh; + overflow: hidden; + display: flex; + flex-direction: column; + animation: slideUp 0.3s ease; + box-shadow: var(--shadow-lg); +} + +@keyframes slideUp { + from { + opacity: 0; + transform: translateY(20px); + } + to { + opacity: 1; + transform: translateY(0); + } +} + +.modal-header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 24px 32px; + border-bottom: 1px solid var(--border-color); +} + +.modal-header h3 { + margin: 0; + font-size: 18px; + font-weight: 600; + color: var(--text-primary); +} + +.modal-close { + width: 32px; + height: 32px; + border-radius: var(--radius-md); + border: none; + background: var(--bg-gray-100); + color: var(--text-tertiary); + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; + transition: var(--transition-base); +} + +.modal-close:hover { + background: var(--border-color); + color: var(--text-primary); +} + +.modal-body { + padding: 24px 32px; + overflow-y: auto; + flex: 1; +} + +.modal-footer { + display: flex; + justify-content: flex-end; + gap: 12px; + padding: 20px 32px; + border-top: 1px solid var(--border-color); +} + +/* Dropdown */ +.dropdown { + position: relative; +} + +.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + margin-top: 4px; + background: var(--bg-white); + border: 1px solid var(--border-color); + border-radius: var(--radius-lg); + box-shadow: var(--shadow-md); + min-width: 180px; + z-index: 10; + display: none; + overflow: hidden; +} + +.dropdown:hover .dropdown-menu { + display: block; +} + +.dropdown-item { + display: flex; + align-items: center; + gap: 10px; + padding: 12px 16px; + background: var(--bg-white); + border: none; + width: 100%; + text-align: left; + font-size: 14px; + color: var(--text-secondary); + cursor: pointer; + transition: background 0.2s ease; +} + +.dropdown-item:hover { + background: var(--bg-gray-50); +} + +.dropdown-item i { + width: 16px; + font-size: 14px; + color: var(--text-tertiary); +} + +.dropdown-item.item-danger { + color: var(--red-600); +} + +.dropdown-item.item-danger i { + color: var(--red-600); +} + +/* Responsive Design */ +@media (max-width: 992px) { + .content { + margin-left: 0; + width: 100%; + padding: 24px; + } + + .sidebar { + transform: translateX(-100%); + transition: transform 0.3s ease; + } + + .sidebar.open { + transform: translateX(0); + } + + .header { + flex-direction: column; + align-items: flex-start; + gap: 16px; + } + + .header-actions { + width: 100%; + flex-wrap: wrap; + } + + .search-input { + width: 100%; + } + + .stats-bar { + grid-template-columns: 1fr; + } + + .form-row { + grid-template-columns: 1fr; + } + + .form-card-body { + padding: 24px; + } +} + +@media (max-width: 768px) { + .content { + padding: 20px; + } + + .page-title { + font-size: 24px; + } + + .table-wrapper { + overflow-x: auto; + } + + .table { + min-width: 800px; + } + + .modal-container { + width: 95%; + } + + .modal-header, + .modal-body, + .modal-footer { + padding: 20px; + } + + .action-buttons { + flex-direction: column; + } + + .form-card-header { + padding: 20px; + } +} + +@media (max-width: 576px) { + .content { + padding: 16px; + } + + .header-actions { + flex-direction: column; + } + + .header-actions > * { + width: 100%; + } + + .form-actions { + flex-direction: column; + } + + .form-actions button { + width: 100%; + justify-content: center; + } +} + +/* Print Styles */ +@media print { + .sidebar, + .header-actions, + .action-buttons { + display: none; + } + + .content { + margin-left: 0; + width: 100%; + } +} \ No newline at end of file