Files
mailova/app/static/style.css

251 lines
16 KiB
CSS

* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
--primary: #2563eb;
--primary-hover: #1d4ed8;
--danger: #dc2626;
--danger-hover: #b91c1c;
--bg: #f8fafc;
--card-bg: #fff;
--border: #e2e8f0;
--text: #1e293b;
--text-muted: #64748b;
--sent: #f59e0b;
--delivered: #10b981;
--received: #8b5cf6;
}
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
/* Navbar */
.navbar { display: flex; align-items: center; justify-content: space-between; padding: .75rem 1.5rem; background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.nav-brand { font-size: 1.15rem; font-weight: 700; color: var(--text); }
.nav-brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 1.25rem; align-items: center; }
.nav-links a { color: var(--text-muted); font-size: .9rem; }
.nav-links a:hover { color: var(--primary); text-decoration: none; }
.nav-logout { color: var(--danger) !important; }
/* Container */
.container { max-width: 960px; margin: 2rem auto; padding: 0 1.5rem; }
/* Auth forms */
.auth-form { max-width: 360px; margin: 4rem auto; background: var(--card-bg); padding: 2rem; border-radius: 8px; border: 1px solid var(--border); }
.auth-form h2 { margin-bottom: 1.25rem; }
.auth-form button[type="submit"] { margin-top: 1.25rem; }
.auth-link { margin-top: 1.5rem; text-align: center; font-size: .9rem; }
/* Forms */
label { display: block; margin-top: 1rem; font-size: .85rem; font-weight: 500; color: var(--text-muted); }
input[type="text"], input[type="password"], input[type="datetime-local"], input[type="date"], select, textarea {
width: 100%; padding: .5rem .75rem; margin-top: .25rem; border: 1px solid var(--border); border-radius: 6px; font-size: .95rem; background: #fff;
}
input:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
input[type="text"] + label, input[type="password"] + label, input[type="datetime-local"] + label, select + label { margin-top: 1.1rem; }
.form-card { background: var(--card-bg); padding: 1.5rem; border-radius: 8px; border: 1px solid var(--border); }
.form-actions { display: flex; gap: .75rem; margin-top: 1.25rem; align-items: center; }
.form-actions .btn, .form-actions button { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; height: 2.1rem; margin-top: 0; }
.form-row { display: flex; gap: .5rem; align-items: center; }
.form-row input[type="text"], .form-row select { flex: 1; width: auto; min-width: 0; }
.form-row .btn { white-space: nowrap; flex-shrink: 0; }
.filter-bar .form-row select { flex: 0 0 auto; width: auto; }
.inline-form { margin-bottom: 1.25rem; }
.rename-form { display: inline-flex; gap: .35rem; align-items: center; margin-right: .5rem; }
.nickname-display { display: inline; }
.nickname-edit { display: inline-flex; gap: .35rem; align-items: center; }
.nickname-edit input[type="text"] { width: 140px; flex: none; }
/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: .5rem 1rem; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text); cursor: pointer; font-size: .9rem; text-align: center; white-space: nowrap; text-decoration: none; line-height: 1; }
.btn:hover { background: var(--bg); text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: var(--danger-hover); }
.btn-sm { padding: .25rem .6rem; font-size: .8rem; }
/* Alert */
.alert { padding: .75rem 1rem; border-radius: 6px; margin-bottom: 1rem; font-size: .9rem; }
.alert-error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
/* Table */
table { width: 100%; border-collapse: collapse; background: var(--card-bg); border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
th, td { padding: .65rem 1rem; text-align: left; border-bottom: 1px solid var(--border); font-size: .9rem; }
th { background: var(--bg); font-weight: 600; color: var(--text-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: none; }
code { background: var(--bg); padding: .15rem .4rem; border-radius: 4px; font-size: .85rem; word-break: break-all; }
.inline { display: inline; }
/* Section */
.section { margin-top: 2rem; margin-bottom: 2rem; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
/* Card grid */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.card { display: block; background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px; padding: 1.25rem; transition: box-shadow .15s; }
.card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.06); text-decoration: none; }
.card h3 { margin-bottom: .5rem; }
.stats { display: flex; gap: .75rem; font-size: .85rem; color: var(--text-muted); flex-wrap: wrap; }
.stat { white-space: nowrap; }
/* Dashboard cards */
.dashboard-card { padding: 1.5rem; transition: transform .15s, box-shadow .15s; }
.dashboard-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.dc-header { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.dc-icon { font-size: 1.6rem; }
.dc-header h3 { font-size: 1.1rem; margin: 0; }
.dc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .25rem; text-align: center; padding-top: .75rem; border-top: 1px solid var(--border); }
.dc-stat { display: flex; flex-direction: column; gap: .15rem; }
.dc-num { font-size: 1.4rem; font-weight: 700; color: var(--text); }
.dc-label { font-size: .7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.dc-sent { color: var(--sent); }
.dc-delivered { color: var(--delivered); }
.dc-received { color: var(--received); }
.dc-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .75rem; }
.dc-tag { display: inline-block; padding: .15rem .5rem; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; font-size: .7rem; color: var(--text-muted); font-weight: 500; }
.dc-recent { display: flex; align-items: center; gap: .4rem; margin-top: .6rem; font-size: .75rem; color: var(--text-muted); }
.dc-recent-label { flex-shrink: 0; }
.dc-recent-item { padding: .1rem .4rem; background: var(--bg); border-radius: 4px; font-family: monospace; font-size: .7rem; }
/* Postcard grid */
.postcard-card { display: flex; gap: 1rem; background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px; padding: .75rem; transition: box-shadow .15s; }
.postcard-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.06); text-decoration: none; }
.thumb { width: 80px; height: 60px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.thumb.placeholder { display: flex; align-items: center; justify-content: center; background: var(--bg); font-size: 1.5rem; }
.postcard-info { display: flex; flex-direction: column; gap: .15rem; font-size: .9rem; }
/* Badge */
.badge { display: inline-block; padding: .1rem .4rem; border-radius: 999px; font-size: .7rem; font-weight: 600; color: #fff; white-space: nowrap; line-height: 1.4; align-self: center; }
.badge-sent { background: var(--sent); }
.badge-delivered { background: var(--delivered); }
.badge-received { background: var(--received); }
/* Detail page */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 1.5rem; }
.detail-images { display: flex; flex-direction: column; gap: 1.5rem; }
.image-block h3 { margin-bottom: .5rem; font-size: .95rem; }
.detail-img { width: 100%; max-width: 400px; border-radius: 8px; border: 1px solid var(--border); }
.detail-img.placeholder { display: flex; align-items: center; justify-content: center; height: 200px; background: var(--bg); color: var(--text-muted); font-size: .95rem; }
.upload-form { margin-top: .5rem; display: flex; gap: .5rem; align-items: center; }
.upload-form input[type="file"] { font-size: .85rem; min-width: 0; max-width: 260px; }
.upload-form .btn { white-space: nowrap; flex-shrink: 0; }
.detail-meta dl { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; }
.detail-meta dt { font-weight: 600; font-size: .85rem; color: var(--text-muted); }
.detail-meta dd { font-size: .95rem; }
/* Tabs */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 1rem; }
.tab { padding: .5rem 1.25rem; border: none; background: none; cursor: pointer; font-size: .9rem; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tab:hover { color: var(--primary); }
/* Dashboard */
.dash-stats { display: flex; gap: .75rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.dash-stat-card { display: flex; align-items: center; gap: .75rem; background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.25rem; flex: 1; min-width: 140px; }
.dash-stat-icon { font-size: 1.5rem; }
.dash-stat-body { display: flex; flex-direction: column; }
.dash-stat-value { font-size: 1.4rem; font-weight: 700; line-height: 1.2; }
.dash-stat-label { font-size: .75rem; color: var(--text-muted); }
.dash-sent { color: var(--sent); }
.dash-delivered { color: var(--delivered); }
.dash-received { color: var(--received); }
.dash-progress { margin-bottom: 2rem; }
.progress-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--border); }
.progress-seg { height: 100%; }
.progress-sent { background: var(--sent); }
.progress-delivered { background: var(--delivered); }
.progress-received { background: var(--received); }
.progress-legend { display: flex; gap: 1.25rem; margin-top: .5rem; font-size: .8rem; color: var(--text-muted); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .25rem; vertical-align: middle; }
.dot-sent { background: var(--sent); }
.dot-delivered { background: var(--delivered); }
.dot-received { background: var(--received); }
.dash-sections { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1.5rem; }
.dash-section h2 { font-size: 1rem; margin-bottom: .75rem; }
.recent-list { display: flex; flex-direction: column; gap: .4rem; }
.recent-item { display: flex; align-items: center; gap: .75rem; padding: .6rem .75rem; border: 1px solid var(--border); border-radius: 8px; background: var(--card-bg); text-decoration: none; color: var(--text); transition: box-shadow .15s; }
.recent-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06); text-decoration: none; }
.recent-img { width: 40px; height: 40px; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.recent-img img { width: 100%; height: 100%; object-fit: cover; }
.recent-info { display: flex; align-items: center; gap: .5rem; }
.recent-meta { margin-left: auto; display: flex; gap: .5rem; font-size: .8rem; color: var(--text-muted); white-space: nowrap; }
.dash-profiles { display: flex; flex-direction: column; gap: .3rem; }
.dash-profile-link { display: flex; align-items: center; justify-content: space-between; padding: .6rem .75rem; border: 1px solid var(--border); border-radius: 8px; background: var(--card-bg); text-decoration: none; color: var(--text); transition: box-shadow .15s; }
.dash-profile-link:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06); text-decoration: none; }
.dash-profile-name { font-weight: 500; }
.dash-profile-arrow { color: var(--text-muted); }
.dash-profile-more { color: var(--primary); border-style: dashed; }
/* Profile cards */
.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.profile-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; padding: 1.25rem; transition: box-shadow .15s; }
.profile-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.profile-card-header { margin-bottom: 1rem; }
.profile-card-name { font-size: 1.1rem; font-weight: 700; display: flex; align-items: center; gap: .4rem; }
.icon-btn { background: none; border: none; cursor: pointer; font-size: .85rem; padding: 0; opacity: .5; transition: opacity .15s; }
.icon-btn:hover { opacity: 1; }
.profile-card-stats { display: flex; gap: 1.25rem; margin-bottom: 1rem; padding: .75rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stat { display: flex; flex-direction: column; align-items: center; }
.stat-value { font-size: 1.1rem; font-weight: 700; }
.stat-label { font-size: .75rem; color: var(--text-muted); }
.badge-sent-text { color: var(--sent); }
.badge-delivered-text { color: var(--delivered); }
.badge-received-text { color: var(--received); }
.profile-card-footer { display: flex; align-items: center; justify-content: space-between; }
.profile-card-date { font-size: .8rem; color: var(--text-muted); }
.profile-card-actions { display: flex; gap: .5rem; align-items: center; }
.rename-form { display: inline-flex; gap: .35rem; align-items: center; }
.rename-form input { width: 140px; padding: .25rem .5rem; font-size: .85rem; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.empty-icon { font-size: 3rem; margin-bottom: .75rem; }
.empty-sub { font-size: .85rem; margin-top: .25rem; }
/* Postcard row */
.postcard-row { display: flex; align-items: center; gap: 1rem; padding: .75rem; border: 1px solid var(--border); border-radius: 8px; background: var(--card-bg); margin-bottom: .5rem; text-decoration: none; color: var(--text); transition: box-shadow .15s; }
.postcard-row:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); text-decoration: none; }
.postcard-row-img { flex-shrink: 0; width: 56px; height: 56px; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.postcard-row-img img { width: 100%; height: 100%; object-fit: cover; }
.postcard-row-img .placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--bg); font-size: 1.2rem; }
.postcard-row-info { flex: 1; display: flex; align-items: center; gap: .75rem; min-width: 0; font-size: .9rem; }
.postcard-row-info strong { white-space: nowrap; }
.postcard-row-info span { white-space: nowrap; color: var(--text-muted); }
.postcard-row-action { flex-shrink: 0; }
.postcard-row-date { font-size: .78rem; color: var(--text-muted); white-space: nowrap; }
.postcard-row-detail { display: flex; flex-direction: column; gap: 0; font-size: .85rem; color: var(--text-muted); }
.detail-title-row { display: flex; align-items: center; gap: .75rem; }
.detail-title-row h1 { margin: 0; }
.btn-back { padding: .35rem .6rem; font-size: 1rem; text-decoration: none; }
.detail-actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
/* Filter */
.filter-bar { margin-bottom: 1.25rem; }
/* Empty state */
.empty { color: var(--text-muted); padding: 2rem; text-align: center; }
/* Responsive */
@media (max-width: 640px) {
.detail-grid { grid-template-columns: 1fr; }
.card-grid { grid-template-columns: 1fr; }
.postcard-row-info { flex-wrap: wrap; gap: .35rem; }
.navbar { padding: .5rem 1rem; }
.nav-links { gap: .75rem; }
.nav-links a { font-size: .8rem; }
.container { margin: 1rem auto; padding: 0 1rem; }
.dash-stats { display: grid; grid-template-columns: 1fr 1fr; }
.dash-stat-card { min-width: 0; }
.dash-sections { grid-template-columns: 1fr; }
.recent-meta > span:nth-child(-n+2) { display: none; }
.recent-meta .recent-time { display: inline; }
.recent-item { gap: .5rem; padding: .5rem; }
.section-header { flex-direction: column; gap: .75rem; }
.section-header .btn { width: auto; }
.detail-title-row h1 { font-size: 1.2rem; }
.btn-back { padding: .25rem .5rem; font-size: .85rem; }
.profile-grid { grid-template-columns: 1fr; }
.profile-card-stats { gap: .75rem; flex-wrap: wrap; }
}