Files
shop-go/internal/handlers/static/css/admin.css
T

417 lines
6.6 KiB
CSS

.admin-body {
background: #f3f4f6;
min-height: 100vh;
}
.admin-login {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 24px;
}
.admin-login__card {
background: #fff;
border-radius: 16px;
padding: 40px;
width: 100%;
max-width: 420px;
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}
.admin-login__logo {
justify-content: center;
margin-bottom: 24px;
}
.admin-login__title {
font-size: 1.5rem;
font-weight: 700;
text-align: center;
margin-bottom: 24px;
}
.admin-login__back {
display: block;
text-align: center;
margin-top: 20px;
color: #6b7280;
text-decoration: none;
font-size: 0.9rem;
}
.admin-login__back:hover {
color: #4f46e5;
}
.admin-form {
display: flex;
flex-direction: column;
gap: 16px;
}
.admin-form__label {
display: flex;
flex-direction: column;
gap: 6px;
font-size: 0.875rem;
font-weight: 500;
color: #374151;
}
.admin-form__input {
padding: 12px 14px;
border: 1px solid #e5e7eb;
border-radius: 10px;
font-size: 1rem;
font-family: inherit;
transition: border-color 0.2s;
}
.admin-form__input:focus {
outline: none;
border-color: #4f46e5;
box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}
.admin-form__submit {
width: 100%;
justify-content: center;
margin-top: 8px;
}
.admin-alert {
padding: 12px 16px;
border-radius: 10px;
font-size: 0.9rem;
margin-bottom: 16px;
}
.admin-alert--error {
background: #fef2f2;
color: #b91c1c;
border: 1px solid #fecaca;
}
.admin-header {
background: #fff;
border-bottom: 1px solid #e5e7eb;
}
.admin-header__inner {
display: flex;
align-items: center;
justify-content: space-between;
height: 64px;
}
.admin-header__user {
display: flex;
align-items: center;
gap: 16px;
font-size: 0.9rem;
color: #6b7280;
}
.admin-main {
padding: 40px 24px;
}
.admin-page-title {
font-size: 1.75rem;
font-weight: 700;
margin-bottom: 32px;
}
.admin-stats {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 20px;
margin-bottom: 40px;
}
.admin-stat {
background: #fff;
border-radius: 12px;
padding: 24px;
border: 1px solid #e5e7eb;
}
.admin-stat__value {
display: block;
font-size: 2rem;
font-weight: 700;
color: #4f46e5;
}
.admin-stat__label {
font-size: 0.875rem;
color: #6b7280;
}
.admin-section {
background: #fff;
border-radius: 12px;
padding: 24px;
border: 1px solid #e5e7eb;
margin-bottom: 24px;
}
.admin-section__title {
font-size: 1.1rem;
font-weight: 600;
margin-bottom: 16px;
}
.admin-table {
width: 100%;
border-collapse: collapse;
}
.admin-table th,
.admin-table td {
text-align: left;
padding: 12px;
border-bottom: 1px solid #f3f4f6;
}
.admin-table th {
font-size: 0.8rem;
text-transform: uppercase;
letter-spacing: 0.05em;
color: #6b7280;
}
.admin-hint {
font-size: 0.875rem;
color: #9ca3af;
}
.admin-hint code {
background: #e5e7eb;
padding: 2px 6px;
border-radius: 4px;
font-size: 0.8rem;
}
.admin-nav {
display: flex;
gap: 8px;
align-items: center;
}
.admin-nav__link {
padding: 8px 14px;
border-radius: 8px;
text-decoration: none;
color: #6b7280;
font-size: 0.9rem;
font-weight: 500;
}
.admin-nav__link:hover {
background: #f3f4f6;
color: #4f46e5;
}
.admin-nav__link--accent {
color: #4f46e5;
background: #eef2ff;
}
.admin-stat--highlight .admin-stat__value {
color: #059669;
}
.admin-actions {
display: flex;
gap: 12px;
flex-wrap: wrap;
margin-bottom: 32px;
}
.admin-page-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24px;
gap: 16px;
flex-wrap: wrap;
}
.admin-page-header .admin-page-title {
margin-bottom: 0;
}
.admin-thumb {
width: 48px;
height: 48px;
object-fit: cover;
border-radius: 8px;
border: 1px solid #e5e7eb;
}
.admin-thumb--empty {
display: inline-flex;
align-items: center;
justify-content: center;
background: #f3f4f6;
color: #9ca3af;
font-size: 0.8rem;
}
.admin-badge {
display: inline-block;
padding: 4px 10px;
border-radius: 100px;
font-size: 0.75rem;
font-weight: 600;
}
.admin-badge--ok {
background: #d1fae5;
color: #065f46;
}
.admin-badge--off {
background: #f3f4f6;
color: #6b7280;
}
.admin-table__actions {
display: flex;
gap: 8px;
align-items: center;
}
.admin-table__actions form {
margin: 0;
}
.btn--danger {
background: #fef2f2;
color: #b91c1c;
border: 1px solid #fecaca;
}
.btn--danger:hover {
background: #fee2e2;
}
.admin-empty {
text-align: center;
color: #9ca3af;
padding: 32px !important;
}
.admin-form-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 24px;
margin-bottom: 24px;
}
.admin-form-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 16px;
}
.admin-form__checkbox {
display: flex;
align-items: center;
gap: 8px;
font-size: 0.9rem;
cursor: pointer;
}
.admin-form__file {
padding: 8px;
}
.admin-form__hint {
font-size: 0.85rem;
color: #9ca3af;
margin-bottom: 8px;
}
.admin-editor {
min-height: 160px;
background: #fff;
}
.admin-editor .ql-editor {
min-height: 140px;
}
.admin-preview {
max-width: 200px;
border-radius: 8px;
border: 1px solid #e5e7eb;
margin-bottom: 12px;
}
.admin-screenshots__grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
gap: 12px;
margin-top: 12px;
}
.admin-screenshot {
position: relative;
aspect-ratio: 1;
border-radius: 8px;
overflow: hidden;
border: 1px solid #e5e7eb;
}
.admin-screenshot img {
width: 100%;
height: 100%;
object-fit: cover;
}
.admin-screenshot__delete {
position: absolute;
top: 4px;
right: 4px;
width: 24px;
height: 24px;
border: none;
border-radius: 50%;
background: rgba(0,0,0,0.6);
color: #fff;
cursor: pointer;
font-size: 1rem;
line-height: 1;
}
.admin-form-actions {
display: flex;
gap: 12px;
margin-top: 24px;
}
.admin-delete-form {
margin-top: 16px;
padding-top: 16px;
border-top: 1px solid #e5e7eb;
}
.admin-product-form {
margin-bottom: 40px;
}
@media (max-width: 768px) {
.admin-form-grid,
.admin-form-row {
grid-template-columns: 1fr;
}
.admin-nav {
display: none;
}
}