728 lines
13 KiB
CSS
728 lines
13 KiB
CSS
/**
|
|
* Universal Components Styles
|
|
* Shared component styles for Admin, Vendor, and Shop sections
|
|
*/
|
|
|
|
/* =============================================================================
|
|
MODAL SYSTEM STYLES
|
|
============================================================================= */
|
|
|
|
/* Modal Backdrop */
|
|
.modal-backdrop {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background-color: rgba(0, 0, 0, 0.5);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 9999;
|
|
animation: fadeIn 0.2s ease-in;
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
/* Modal Container */
|
|
.modal-container {
|
|
background: white;
|
|
border-radius: 8px;
|
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
|
|
max-width: 500px;
|
|
width: 90%;
|
|
max-height: 90vh;
|
|
overflow-y: auto;
|
|
animation: slideUp 0.3s ease-out;
|
|
}
|
|
|
|
@keyframes slideUp {
|
|
from {
|
|
transform: translateY(20px);
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
transform: translateY(0);
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
/* Modal Header */
|
|
.modal-header {
|
|
padding: 20px 24px;
|
|
border-bottom: 1px solid #e5e7eb;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.modal-title {
|
|
font-size: 1.25rem;
|
|
font-weight: 600;
|
|
color: #111827;
|
|
margin: 0;
|
|
}
|
|
|
|
.modal-close {
|
|
background: none;
|
|
border: none;
|
|
font-size: 1.5rem;
|
|
color: #6b7280;
|
|
cursor: pointer;
|
|
padding: 0;
|
|
width: 32px;
|
|
height: 32px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: 4px;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.modal-close:hover {
|
|
background-color: #f3f4f6;
|
|
color: #111827;
|
|
}
|
|
|
|
/* Modal Body */
|
|
.modal-body {
|
|
padding: 24px;
|
|
}
|
|
|
|
.modal-message {
|
|
font-size: 0.95rem;
|
|
color: #374151;
|
|
line-height: 1.6;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.modal-warning {
|
|
background-color: #fef3c7;
|
|
border-left: 4px solid #f59e0b;
|
|
padding: 12px 16px;
|
|
border-radius: 4px;
|
|
margin-top: 16px;
|
|
}
|
|
|
|
.modal-warning p {
|
|
margin: 0;
|
|
color: #92400e;
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.modal-details {
|
|
background-color: #f9fafb;
|
|
border: 1px solid #e5e7eb;
|
|
border-radius: 4px;
|
|
padding: 12px;
|
|
margin-top: 12px;
|
|
font-family: 'Courier New', monospace;
|
|
font-size: 0.875rem;
|
|
color: #374151;
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
}
|
|
|
|
/* Modal Footer */
|
|
.modal-footer {
|
|
padding: 16px 24px;
|
|
border-top: 1px solid #e5e7eb;
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
gap: 12px;
|
|
}
|
|
|
|
/* Modal Icon Styles */
|
|
.modal-icon {
|
|
width: 48px;
|
|
height: 48px;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin: 0 auto 16px;
|
|
font-size: 24px;
|
|
}
|
|
|
|
.modal-icon.success {
|
|
background-color: #d1fae5;
|
|
color: #059669;
|
|
}
|
|
|
|
.modal-icon.error {
|
|
background-color: #fee2e2;
|
|
color: #dc2626;
|
|
}
|
|
|
|
.modal-icon.warning {
|
|
background-color: #fef3c7;
|
|
color: #f59e0b;
|
|
}
|
|
|
|
/* Loading Overlay */
|
|
.loading-overlay {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background-color: rgba(0, 0, 0, 0.3);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 10000;
|
|
}
|
|
|
|
.loading-spinner {
|
|
width: 48px;
|
|
height: 48px;
|
|
border: 4px solid #e5e7eb;
|
|
border-top-color: #3b82f6;
|
|
border-radius: 50%;
|
|
animation: spin 0.8s linear infinite;
|
|
}
|
|
|
|
@keyframes spin {
|
|
to {
|
|
transform: rotate(360deg);
|
|
}
|
|
}
|
|
|
|
/* =============================================================================
|
|
BUTTON STYLES
|
|
============================================================================= */
|
|
|
|
.btn {
|
|
padding: 10px 20px;
|
|
border: none;
|
|
border-radius: 6px;
|
|
font-size: 0.95rem;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.btn:disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.btn-primary {
|
|
background-color: #3b82f6;
|
|
color: white;
|
|
}
|
|
|
|
.btn-primary:hover:not(:disabled) {
|
|
background-color: #2563eb;
|
|
}
|
|
|
|
.btn-secondary {
|
|
background-color: #6b7280;
|
|
color: white;
|
|
}
|
|
|
|
.btn-secondary:hover:not(:disabled) {
|
|
background-color: #4b5563;
|
|
}
|
|
|
|
.btn-success {
|
|
background-color: #10b981;
|
|
color: white;
|
|
}
|
|
|
|
.btn-success:hover:not(:disabled) {
|
|
background-color: #059669;
|
|
}
|
|
|
|
.btn-danger {
|
|
background-color: #ef4444;
|
|
color: white;
|
|
}
|
|
|
|
.btn-danger:hover:not(:disabled) {
|
|
background-color: #dc2626;
|
|
}
|
|
|
|
.btn-warning {
|
|
background-color: #f59e0b;
|
|
color: white;
|
|
}
|
|
|
|
.btn-warning:hover:not(:disabled) {
|
|
background-color: #d97706;
|
|
}
|
|
|
|
.btn-outline {
|
|
background-color: transparent;
|
|
border: 1px solid #d1d5db;
|
|
color: #374151;
|
|
}
|
|
|
|
.btn-outline:hover:not(:disabled) {
|
|
background-color: #f9fafb;
|
|
border-color: #9ca3af;
|
|
}
|
|
|
|
.btn-ghost {
|
|
background-color: transparent;
|
|
color: #6b7280;
|
|
}
|
|
|
|
.btn-ghost:hover:not(:disabled) {
|
|
background-color: #f3f4f6;
|
|
}
|
|
|
|
.btn-sm {
|
|
padding: 6px 12px;
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.btn-lg {
|
|
padding: 12px 24px;
|
|
font-size: 1.05rem;
|
|
}
|
|
|
|
/* =============================================================================
|
|
ADMIN LAYOUT STYLES
|
|
============================================================================= */
|
|
|
|
.admin-header {
|
|
background-color: #1f2937;
|
|
color: white;
|
|
padding: 0 24px;
|
|
height: 64px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 100;
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.header-left {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
}
|
|
|
|
.header-title {
|
|
font-size: 1.25rem;
|
|
font-weight: 600;
|
|
margin: 0;
|
|
}
|
|
|
|
.menu-toggle {
|
|
background: none;
|
|
border: none;
|
|
color: white;
|
|
font-size: 1.5rem;
|
|
cursor: pointer;
|
|
padding: 8px;
|
|
display: none;
|
|
}
|
|
|
|
.header-right {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
}
|
|
|
|
.user-name {
|
|
font-size: 0.95rem;
|
|
color: #e5e7eb;
|
|
}
|
|
|
|
.btn-logout {
|
|
background-color: #374151;
|
|
color: white;
|
|
border: none;
|
|
padding: 8px 16px;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
font-size: 0.9rem;
|
|
transition: background-color 0.2s;
|
|
}
|
|
|
|
.btn-logout:hover {
|
|
background-color: #4b5563;
|
|
}
|
|
|
|
.admin-sidebar {
|
|
width: 260px;
|
|
background-color: #f9fafb;
|
|
border-right: 1px solid #e5e7eb;
|
|
height: calc(100vh - 64px);
|
|
position: fixed;
|
|
left: 0;
|
|
top: 64px;
|
|
overflow-y: auto;
|
|
transition: transform 0.3s ease;
|
|
}
|
|
|
|
.sidebar-nav {
|
|
padding: 16px 0;
|
|
}
|
|
|
|
.nav-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 12px 24px;
|
|
color: #374151;
|
|
text-decoration: none;
|
|
transition: all 0.2s;
|
|
font-size: 0.95rem;
|
|
}
|
|
|
|
.nav-item:hover {
|
|
background-color: #e5e7eb;
|
|
color: #111827;
|
|
}
|
|
|
|
.nav-item.active {
|
|
background-color: #3b82f6;
|
|
color: white;
|
|
border-left: 4px solid #2563eb;
|
|
}
|
|
|
|
.nav-item i {
|
|
width: 20px;
|
|
text-align: center;
|
|
}
|
|
|
|
.admin-content {
|
|
margin-left: 260px;
|
|
padding: 24px;
|
|
min-height: calc(100vh - 64px);
|
|
}
|
|
|
|
/* =============================================================================
|
|
VENDOR LAYOUT STYLES
|
|
============================================================================= */
|
|
|
|
.vendor-header {
|
|
background-color: #059669;
|
|
color: white;
|
|
padding: 0 24px;
|
|
height: 64px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 100;
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.vendor-header .btn-logout {
|
|
background-color: #047857;
|
|
color: white;
|
|
border: none;
|
|
padding: 8px 16px;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
font-size: 0.9rem;
|
|
transition: background-color 0.2s;
|
|
}
|
|
|
|
.vendor-header .btn-logout:hover {
|
|
background-color: #065f46;
|
|
}
|
|
|
|
.vendor-header .menu-toggle {
|
|
background: none;
|
|
border: none;
|
|
color: white;
|
|
font-size: 1.5rem;
|
|
cursor: pointer;
|
|
padding: 8px;
|
|
display: none;
|
|
}
|
|
|
|
.vendor-sidebar {
|
|
width: 260px;
|
|
background-color: #f9fafb;
|
|
border-right: 1px solid #e5e7eb;
|
|
height: calc(100vh - 64px);
|
|
position: fixed;
|
|
left: 0;
|
|
top: 64px;
|
|
overflow-y: auto;
|
|
transition: transform 0.3s ease;
|
|
}
|
|
|
|
.vendor-content {
|
|
margin-left: 260px;
|
|
padding: 24px;
|
|
min-height: calc(100vh - 64px);
|
|
}
|
|
|
|
/* =============================================================================
|
|
SHOP LAYOUT STYLES
|
|
============================================================================= */
|
|
|
|
.shop-header {
|
|
background-color: white;
|
|
border-bottom: 1px solid #e5e7eb;
|
|
padding: 16px 24px;
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 100;
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
.shop-header-top {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
max-width: 1280px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.shop-logo {
|
|
font-size: 1.5rem;
|
|
font-weight: 700;
|
|
color: #111827;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.shop-search {
|
|
flex: 1;
|
|
max-width: 500px;
|
|
margin: 0 32px;
|
|
}
|
|
|
|
.search-form {
|
|
display: flex;
|
|
gap: 8px;
|
|
}
|
|
|
|
.search-input {
|
|
flex: 1;
|
|
padding: 10px 16px;
|
|
border: 1px solid #d1d5db;
|
|
border-radius: 6px;
|
|
font-size: 0.95rem;
|
|
}
|
|
|
|
.search-input:focus {
|
|
outline: none;
|
|
border-color: #3b82f6;
|
|
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
|
|
}
|
|
|
|
.shop-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
}
|
|
|
|
.cart-button {
|
|
position: relative;
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
padding: 8px;
|
|
font-size: 1.5rem;
|
|
color: #374151;
|
|
}
|
|
|
|
.cart-button:hover {
|
|
color: #111827;
|
|
}
|
|
|
|
.cart-count {
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
background-color: #ef4444;
|
|
color: white;
|
|
font-size: 0.75rem;
|
|
font-weight: 600;
|
|
padding: 2px 6px;
|
|
border-radius: 10px;
|
|
min-width: 20px;
|
|
text-align: center;
|
|
}
|
|
|
|
.shop-nav {
|
|
display: flex;
|
|
gap: 24px;
|
|
max-width: 1280px;
|
|
margin: 16px auto 0;
|
|
padding-top: 16px;
|
|
border-top: 1px solid #e5e7eb;
|
|
}
|
|
|
|
.shop-nav-item {
|
|
color: #6b7280;
|
|
text-decoration: none;
|
|
font-size: 0.95rem;
|
|
padding: 8px 0;
|
|
transition: color 0.2s;
|
|
}
|
|
|
|
.shop-nav-item:hover {
|
|
color: #111827;
|
|
}
|
|
|
|
.shop-nav-item.active {
|
|
color: #3b82f6;
|
|
font-weight: 500;
|
|
border-bottom: 2px solid #3b82f6;
|
|
}
|
|
|
|
.shop-content {
|
|
max-width: 1280px;
|
|
margin: 0 auto;
|
|
padding: 32px 24px;
|
|
}
|
|
|
|
/* =============================================================================
|
|
SHOP ACCOUNT LAYOUT STYLES
|
|
============================================================================= */
|
|
|
|
.account-layout {
|
|
display: grid;
|
|
grid-template-columns: 260px 1fr;
|
|
gap: 32px;
|
|
max-width: 1280px;
|
|
margin: 0 auto;
|
|
padding: 32px 24px;
|
|
}
|
|
|
|
.account-sidebar {
|
|
background-color: #f9fafb;
|
|
border: 1px solid #e5e7eb;
|
|
border-radius: 8px;
|
|
padding: 16px;
|
|
height: fit-content;
|
|
}
|
|
|
|
.account-nav-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 12px 16px;
|
|
color: #374151;
|
|
text-decoration: none;
|
|
border-radius: 6px;
|
|
transition: all 0.2s;
|
|
font-size: 0.95rem;
|
|
}
|
|
|
|
.account-nav-item:hover {
|
|
background-color: #e5e7eb;
|
|
}
|
|
|
|
.account-nav-item.active {
|
|
background-color: #3b82f6;
|
|
color: white;
|
|
}
|
|
|
|
.account-content {
|
|
background-color: white;
|
|
border: 1px solid #e5e7eb;
|
|
border-radius: 8px;
|
|
padding: 32px;
|
|
}
|
|
|
|
/* =============================================================================
|
|
RESPONSIVE STYLES
|
|
============================================================================= */
|
|
|
|
@media (max-width: 768px) {
|
|
.menu-toggle {
|
|
display: block;
|
|
}
|
|
|
|
.vendor-header .menu-toggle {
|
|
display: block;
|
|
}
|
|
|
|
.admin-sidebar,
|
|
.vendor-sidebar {
|
|
transform: translateX(-100%);
|
|
}
|
|
|
|
.admin-sidebar.open,
|
|
.vendor-sidebar.open {
|
|
transform: translateX(0);
|
|
}
|
|
|
|
.admin-content,
|
|
.vendor-content {
|
|
margin-left: 0;
|
|
}
|
|
|
|
.shop-search {
|
|
display: none;
|
|
}
|
|
|
|
.account-layout {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.account-sidebar {
|
|
display: none;
|
|
}
|
|
|
|
.modal-container {
|
|
width: 95%;
|
|
margin: 16px;
|
|
}
|
|
|
|
.modal-footer {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.modal-footer .btn {
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
/* =============================================================================
|
|
UTILITY CLASSES
|
|
============================================================================= */
|
|
|
|
.text-center {
|
|
text-align: center;
|
|
}
|
|
|
|
.mb-0 { margin-bottom: 0; }
|
|
.mb-1 { margin-bottom: 8px; }
|
|
.mb-2 { margin-bottom: 16px; }
|
|
.mb-3 { margin-bottom: 24px; }
|
|
.mb-4 { margin-bottom: 32px; }
|
|
|
|
.mt-0 { margin-top: 0; }
|
|
.mt-1 { margin-top: 8px; }
|
|
.mt-2 { margin-top: 16px; }
|
|
.mt-3 { margin-top: 24px; }
|
|
.mt-4 { margin-top: 32px; }
|
|
|
|
.hidden {
|
|
display: none !important;
|
|
}
|
|
|
|
.pointer {
|
|
cursor: pointer;
|
|
} |