Files
intra.cuitunet.fi/style.css
Jukka Lampikoski 42e3648e3d Add Asiakaspalvelu email ticketing system
IMAP client for fetching emails from asiakaspalvelu@cuitunet.fi,
Freshdesk-style ticket management with status tracking, message
threading, reply/note functionality, and IMAP settings in API tab.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 08:52:00 +02:00

1247 lines
20 KiB
CSS

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: #f0f2f5;
color: #1a1a2e;
min-height: 100vh;
}
/* Login */
.login-screen {
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
background: linear-gradient(135deg, #0f3460, #16213e);
}
.login-box {
background: #fff;
padding: 3rem;
border-radius: 12px;
box-shadow: 0 20px 60px rgba(0,0,0,0.3);
text-align: center;
width: 100%;
max-width: 400px;
margin: 1rem;
}
.login-box h1 {
font-size: 1.8rem;
margin-bottom: 0.5rem;
color: #0f3460;
}
.login-box p {
color: #666;
margin-bottom: 1.5rem;
}
.login-box input {
width: 100%;
padding: 12px 16px;
border: 2px solid #e0e0e0;
border-radius: 8px;
font-size: 1rem;
margin-bottom: 1rem;
transition: border-color 0.2s;
}
.login-box input:focus {
outline: none;
border-color: #0f3460;
}
.login-box button {
width: 100%;
padding: 12px;
background: #0f3460;
color: #fff;
border: none;
border-radius: 8px;
font-size: 1rem;
cursor: pointer;
transition: background 0.2s;
}
.login-box button:hover {
background: #16213e;
}
.error {
color: #e74c3c;
margin-top: 1rem;
font-size: 0.9rem;
}
.success-msg {
color: #2ecc71;
margin-top: 1rem;
font-size: 0.9rem;
}
.forgot-link {
display: inline-block;
margin-top: 1rem;
color: #0f3460;
font-size: 0.85rem;
text-decoration: none;
opacity: 0.7;
transition: opacity 0.2s;
}
.forgot-link:hover {
opacity: 1;
text-decoration: underline;
}
.captcha-row {
display: flex;
align-items: center;
gap: 0.75rem;
margin-bottom: 1rem;
}
.captcha-question {
font-size: 1.1rem;
font-weight: 700;
color: #0f3460;
white-space: nowrap;
min-width: 120px;
text-align: center;
background: #f0f2f5;
padding: 10px 14px;
border-radius: 8px;
letter-spacing: 1px;
}
.captcha-row input {
flex: 1;
margin-bottom: 0 !important;
}
/* Header */
header {
background: linear-gradient(135deg, #0f3460, #16213e);
color: #fff;
padding: 1rem 2rem;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 2px 12px rgba(0,0,0,0.15);
position: sticky;
top: 0;
z-index: 100;
}
.header-brand {
display: flex;
align-items: center;
gap: 0.75rem;
}
.brand-icon {
font-size: 1.8rem;
line-height: 1;
}
.header-left h1 {
font-size: 1.3rem;
letter-spacing: -0.3px;
}
.subtitle {
font-size: 0.8rem;
opacity: 0.7;
}
.header-right {
display: flex;
gap: 0.75rem;
align-items: center;
}
.user-info {
font-size: 0.85rem;
opacity: 0.8;
padding-right: 0.5rem;
border-right: 1px solid rgba(255,255,255,0.2);
}
/* Main container */
.main-container {
max-width: 1400px;
margin: 0 auto;
padding: 1.5rem;
min-height: calc(100vh - 120px);
}
/* Content layout: table left, stats right */
.content-layout {
display: grid;
grid-template-columns: 1fr 220px;
gap: 1.25rem;
align-items: start;
}
.content-main {
min-width: 0;
}
/* Sidebar stats */
.sidebar-stats {
display: flex;
flex-direction: column;
gap: 0.6rem;
position: sticky;
top: 80px;
}
.sidebar-stats .stat-card {
background: #fff;
border-radius: 10px;
padding: 0.8rem 1rem;
box-shadow: 0 1px 3px rgba(0,0,0,0.06);
text-align: center;
}
.sidebar-stats .stat-card.highlight {
background: #0f3460;
color: #fff;
}
.sidebar-stats .stat-card.highlight .stat-label {
color: rgba(255,255,255,0.7);
}
.sidebar-stats .stat-card.highlight .stat-value {
color: #fff;
}
.sidebar-stats .stat-card.trivia {
background: #f8f9fb;
border: 1px dashed #d5dbe5;
}
.stat-label {
font-size: 0.7rem;
color: #888;
text-transform: uppercase;
letter-spacing: 0.5px;
margin-bottom: 0.2rem;
}
.stat-value {
font-size: 1.2rem;
font-weight: 700;
color: #1a1a2e;
}
.stat-highlight {
color: #0f3460;
}
.sidebar-stats .stat-card.trivia .stat-value {
font-size: 1rem;
color: #555;
}
.stat-sub {
font-size: 0.7rem;
color: #999;
margin-top: 1px;
}
.speed-table {
display: flex;
flex-direction: column;
gap: 0.25rem;
margin-top: 0.3rem;
}
.speed-item {
font-size: 0.78rem;
color: #666;
white-space: nowrap;
display: flex;
align-items: center;
gap: 4px;
}
.speed-item.top {
font-weight: 700;
color: #0f3460;
}
.speed-bar {
display: inline-block;
height: 5px;
background: #d5dbe5;
border-radius: 3px;
flex-shrink: 0;
}
.speed-item.top .speed-bar {
background: #0f3460;
}
/* Toolbar */
.toolbar {
margin-bottom: 1rem;
}
.search-bar {
position: relative;
}
.search-icon {
position: absolute;
left: 14px;
top: 50%;
transform: translateY(-50%);
font-size: 1rem;
opacity: 0.4;
pointer-events: none;
}
.search-bar input {
width: 100%;
padding: 11px 16px 11px 40px;
border: 2px solid #e0e0e0;
border-radius: 10px;
font-size: 0.93rem;
background: #fff;
transition: border-color 0.2s, box-shadow 0.2s;
}
.search-bar input:focus {
outline: none;
border-color: #0f3460;
box-shadow: 0 0 0 3px rgba(15,52,96,0.1);
}
/* Table card */
.table-card {
background: #fff;
border-radius: 12px;
overflow: hidden;
box-shadow: 0 1px 4px rgba(0,0,0,0.06);
margin-bottom: 1rem;
}
table {
width: 100%;
border-collapse: collapse;
}
thead th {
background: #16213e;
color: #fff;
padding: 11px 14px;
text-align: left;
font-weight: 600;
font-size: 0.82rem;
cursor: pointer;
user-select: none;
white-space: nowrap;
letter-spacing: 0.2px;
}
thead th:hover {
background: #1a2744;
}
tbody tr {
border-bottom: 1px solid #f0f0f0;
cursor: pointer;
transition: background 0.15s;
}
tbody tr:last-child {
border-bottom: none;
}
tbody tr:hover {
background: #f4f7fb;
}
tbody tr.sub-row {
background: #fafbfc;
}
tbody tr.sub-row:hover {
background: #f0f3f7;
}
.sub-marker {
color: #bbb;
font-size: 0.85rem;
margin-left: 0.5rem;
}
tbody td {
padding: 11px 14px;
font-size: 0.9rem;
}
.price-cell {
font-weight: 700;
color: #0f3460;
}
.actions-cell {
white-space: nowrap;
}
.actions-cell button {
background: none;
border: none;
cursor: pointer;
padding: 5px 7px;
font-size: 0.95rem;
border-radius: 6px;
transition: background 0.15s;
}
.actions-cell button:hover {
background: #eef1f6;
}
.empty-state {
text-align: center;
padding: 3rem 2rem;
color: #888;
}
.empty-icon {
font-size: 3rem;
margin-bottom: 0.75rem;
opacity: 0.4;
}
.empty-state p {
font-size: 1.05rem;
margin-bottom: 0.25rem;
}
.empty-hint {
font-size: 0.9rem !important;
color: #aaa;
}
/* Summary */
.summary-bar {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.8rem 1.25rem;
background: #fff;
border-radius: 10px;
box-shadow: 0 1px 4px rgba(0,0,0,0.06);
font-weight: 600;
font-size: 0.85rem;
color: #555;
}
#total-billing {
font-size: 0.95rem;
color: #0f3460;
}
/* Footer */
footer {
text-align: center;
padding: 1.5rem;
color: #aaa;
font-size: 0.8rem;
border-top: 1px solid #e5e7eb;
margin-top: 1rem;
}
/* Buttons */
.btn-primary {
background: #2ecc71;
color: #fff;
border: none;
padding: 10px 20px;
border-radius: 8px;
cursor: pointer;
font-size: 0.9rem;
font-weight: 600;
transition: background 0.2s, transform 0.1s;
}
.btn-primary:hover {
background: #27ae60;
}
.btn-primary:active {
transform: scale(0.97);
}
.btn-secondary {
background: transparent;
color: #fff;
border: 2px solid rgba(255,255,255,0.3);
padding: 8px 18px;
border-radius: 8px;
cursor: pointer;
font-size: 0.9rem;
transition: all 0.2s;
}
.btn-secondary:hover {
border-color: #fff;
background: rgba(255,255,255,0.1);
}
.btn-danger {
background: #e74c3c;
color: #fff;
border: none;
padding: 10px 20px;
border-radius: 8px;
cursor: pointer;
font-size: 0.9rem;
transition: background 0.2s;
}
.btn-danger:hover {
background: #c0392b;
}
.btn-add-row {
background: #3498db;
color: #fff;
border: none;
padding: 4px 12px;
border-radius: 6px;
font-size: 0.78rem;
cursor: pointer;
margin-left: 0.75rem;
vertical-align: middle;
transition: background 0.2s;
}
.btn-add-row:hover {
background: #2980b9;
}
.btn-remove-row {
background: none;
border: none;
color: #ccc;
font-size: 1rem;
cursor: pointer;
padding: 2px 6px;
border-radius: 4px;
transition: color 0.15s, background 0.15s;
}
.btn-remove-row:hover {
color: #e74c3c;
background: #fef2f2;
}
/* Modal */
.modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
padding: 1rem;
backdrop-filter: blur(2px);
}
.modal-content {
background: #fff;
border-radius: 16px;
width: 100%;
max-width: 700px;
max-height: 90vh;
overflow-y: auto;
box-shadow: 0 20px 60px rgba(0,0,0,0.3);
animation: modalIn 0.2s ease-out;
}
.modal-content.modal-wide {
max-width: 800px;
}
@keyframes modalIn {
from { opacity: 0; transform: scale(0.95) translateY(10px); }
to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1.25rem 1.5rem;
border-bottom: 1px solid #eee;
}
.modal-header h2 {
font-size: 1.3rem;
color: #0f3460;
}
.modal-close {
background: none;
border: none;
font-size: 1.8rem;
cursor: pointer;
color: #999;
line-height: 1;
width: 36px;
height: 36px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.15s;
}
.modal-close:hover {
color: #333;
background: #f0f0f0;
}
/* Form */
form {
padding: 1.5rem;
}
form h3 {
font-size: 0.95rem;
color: #0f3460;
margin: 1.25rem 0 0.75rem;
padding-bottom: 0.5rem;
border-bottom: 2px solid #f0f2f5;
display: flex;
align-items: center;
}
form h3:first-of-type {
margin-top: 0;
}
.form-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0.85rem;
}
.form-grid-liittyma {
grid-template-columns: repeat(3, 1fr);
}
.form-group {
display: flex;
flex-direction: column;
}
.form-group.full-width {
grid-column: 1 / -1;
}
.form-group label {
font-size: 0.78rem;
font-weight: 600;
color: #555;
margin-bottom: 0.25rem;
}
.form-group input,
.form-group textarea,
.form-group select {
padding: 9px 11px;
border: 2px solid #e0e0e0;
border-radius: 8px;
font-size: 0.9rem;
transition: border-color 0.2s, box-shadow 0.2s;
font-family: inherit;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
outline: none;
border-color: #0f3460;
box-shadow: 0 0 0 3px rgba(15,52,96,0.1);
}
.checkbox-label {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 0.85rem;
color: #555;
cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
width: 16px;
height: 16px;
accent-color: #0f3460;
}
.form-actions {
display: flex;
gap: 0.75rem;
padding: 1.25rem 1.5rem;
border-top: 1px solid #eee;
justify-content: flex-end;
}
.form-actions .btn-secondary {
color: #666;
border-color: #ddd;
}
.form-actions .btn-secondary:hover {
color: #333;
border-color: #999;
}
/* Liittymä rows in form */
.liittyma-row {
background: #f8f9fb;
border: 1px solid #e8ebf0;
border-radius: 10px;
padding: 0.75rem 1rem;
margin-bottom: 0.6rem;
}
.liittyma-row-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 0.5rem;
}
.liittyma-row-title {
font-size: 0.8rem;
font-weight: 600;
color: #0f3460;
}
/* Detail view */
#detail-body {
padding: 1.5rem;
}
.detail-section {
margin-bottom: 1.5rem;
}
.detail-section:last-child {
margin-bottom: 0;
}
.detail-section h3 {
font-size: 0.95rem;
color: #0f3460;
margin-bottom: 0.75rem;
padding-bottom: 0.5rem;
border-bottom: 2px solid #f0f2f5;
}
.detail-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0.75rem 2rem;
}
.detail-item {
padding: 0.3rem 0;
}
.detail-label {
font-size: 0.72rem;
color: #999;
text-transform: uppercase;
letter-spacing: 0.5px;
margin-bottom: 2px;
}
.detail-value {
font-size: 0.93rem;
font-weight: 500;
color: #1a1a2e;
word-break: break-word;
}
.detail-value a {
color: #0f3460;
text-decoration: none;
}
.detail-value a:hover {
text-decoration: underline;
}
.detail-value.empty,
span.empty {
color: #ccc;
font-style: italic;
}
/* Liittymä card in detail view */
.liittyma-card {
background: #f8f9fb;
border: 1px solid #e8ebf0;
border-radius: 10px;
padding: 0.75rem 1rem;
margin-bottom: 0.5rem;
}
.liittyma-num {
font-size: 0.75rem;
font-weight: 700;
color: #0f3460;
margin-bottom: 0.4rem;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.liittyma-total {
text-align: right;
font-weight: 700;
font-size: 0.95rem;
color: #0f3460;
margin-top: 0.5rem;
padding-top: 0.5rem;
border-top: 2px solid #e8ebf0;
}
/* Files */
.file-upload-area {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 0.5rem;
}
.file-list {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.file-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.6rem 0.75rem;
background: #f8f9fb;
border-radius: 8px;
border: 1px solid #eee;
}
.file-info {
display: flex;
flex-direction: column;
min-width: 0;
}
.file-name {
font-size: 0.9rem;
font-weight: 500;
color: #0f3460;
text-decoration: none;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.file-name:hover {
text-decoration: underline;
}
.file-meta {
font-size: 0.75rem;
color: #999;
}
.file-delete-btn {
background: none;
border: none;
color: #ccc;
font-size: 1rem;
cursor: pointer;
padding: 4px 8px;
border-radius: 4px;
transition: all 0.15s;
flex-shrink: 0;
}
.file-delete-btn:hover {
color: #e74c3c;
background: #fef2f2;
}
/* Responsive */
@media (max-width: 1024px) {
.content-layout {
grid-template-columns: 1fr;
}
.sidebar-stats {
position: static;
flex-direction: row;
flex-wrap: wrap;
gap: 0.5rem;
}
.sidebar-stats .stat-card {
flex: 1;
min-width: 120px;
}
}
@media (max-width: 768px) {
header {
flex-direction: column;
gap: 0.75rem;
padding: 1rem;
text-align: center;
}
.header-brand {
justify-content: center;
}
.main-container {
padding: 1rem;
}
.form-grid,
.form-grid-liittyma,
.detail-grid {
grid-template-columns: 1fr;
}
.summary-bar {
flex-direction: column;
gap: 0.25rem;
text-align: center;
}
thead th,
tbody td {
padding: 9px 10px;
font-size: 0.83rem;
}
}
@media (max-width: 480px) {
.header-right {
flex-direction: column;
width: 100%;
}
.header-right .btn-primary,
.header-right .btn-secondary {
width: 100%;
text-align: center;
}
}
/* Tab bar */
.tab-bar {
display: flex;
gap: 0;
background: #fff;
border-bottom: 2px solid #e5e7eb;
padding: 0 2rem;
position: sticky;
top: 56px;
z-index: 99;
}
.tab {
padding: 0.75rem 1.25rem;
background: none;
border: none;
border-bottom: 3px solid transparent;
font-size: 0.88rem;
font-weight: 600;
color: #888;
cursor: pointer;
transition: all 0.2s;
margin-bottom: -2px;
}
.tab:hover {
color: #0f3460;
}
.tab.active {
color: #0f3460;
border-bottom-color: #0f3460;
}
.tab-content {
display: none;
}
.tab-content.active {
display: block;
}
/* Role badge */
.role-badge {
display: inline-block;
padding: 3px 10px;
border-radius: 12px;
font-size: 0.75rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.3px;
}
.role-admin {
background: #0f3460;
color: #fff;
}
.role-user {
background: #e8ebf0;
color: #555;
}
/* Small buttons */
.btn-small {
display: inline-block;
padding: 4px 10px;
border: none;
border-radius: 6px;
font-size: 0.78rem;
font-weight: 600;
cursor: pointer;
transition: all 0.15s;
}
.btn-restore {
background: #2ecc71;
color: #fff;
}
.btn-restore:hover {
background: #27ae60;
}
.btn-perm-delete {
background: #e74c3c;
color: #fff;
margin-left: 4px;
}
.btn-perm-delete:hover {
background: #c0392b;
}
/* Lead status badges */
.lead-status {
display: inline-block;
padding: 3px 10px;
border-radius: 12px;
font-size: 0.75rem;
font-weight: 600;
letter-spacing: 0.3px;
}
.lead-status-uusi {
background: #3498db;
color: #fff;
}
.lead-status-kontaktoitu {
background: #f39c12;
color: #fff;
}
.lead-status-kiinnostunut {
background: #2ecc71;
color: #fff;
}
.lead-status-odottaa {
background: #9b59b6;
color: #fff;
}
.lead-status-ei_kiinnosta {
background: #e8ebf0;
color: #888;
}
/* Ticket status badges */
.ticket-status {
display: inline-block;
padding: 3px 10px;
border-radius: 12px;
font-size: 0.75rem;
font-weight: 600;
letter-spacing: 0.3px;
white-space: nowrap;
}
.ticket-status-uusi {
background: #3498db;
color: #fff;
}
.ticket-status-kasittelyssa {
background: #f39c12;
color: #fff;
}
.ticket-status-odottaa {
background: #f1c40f;
color: #333;
}
.ticket-status-ratkaistu {
background: #2ecc71;
color: #fff;
}
.ticket-status-suljettu {
background: #bdc3c7;
color: #555;
}
/* Ticket thread */
.ticket-thread {
display: flex;
flex-direction: column;
gap: 0.75rem;
margin: 1.25rem 0;
padding: 1rem 0;
border-top: 2px solid #f0f2f5;
border-bottom: 2px solid #f0f2f5;
max-height: 60vh;
overflow-y: auto;
}
.ticket-message {
border-radius: 10px;
padding: 0.75rem 1rem;
position: relative;
}
.ticket-msg-in {
background: #f0f7ff;
border-left: 3px solid #3498db;
}
.ticket-msg-out {
background: #eafaf1;
border-left: 3px solid #2ecc71;
}
.ticket-msg-note {
background: #fffbea;
border-left: 3px solid #f39c12;
}
.ticket-msg-header {
display: flex;
align-items: center;
gap: 0.5rem;
margin-bottom: 0.5rem;
font-size: 0.82rem;
color: #555;
flex-wrap: wrap;
}
.ticket-msg-type {
font-size: 0.75rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.3px;
opacity: 0.7;
}
.ticket-msg-time {
margin-left: auto;
color: #999;
font-size: 0.78rem;
}
.ticket-msg-body {
font-size: 0.9rem;
line-height: 1.6;
color: #333;
white-space: pre-wrap;
word-break: break-word;
}
/* Ticket reply form */
.ticket-reply-form {
padding-top: 1rem;
}
.ticket-reply-form textarea {
width: 100%;
padding: 10px 12px;
border: 2px solid #e0e0e0;
border-radius: 8px;
font-size: 0.9rem;
font-family: inherit;
resize: vertical;
transition: border-color 0.2s, box-shadow 0.2s;
}
.ticket-reply-form textarea:focus {
outline: none;
border-color: #0f3460;
box-shadow: 0 0 0 3px rgba(15, 52, 96, 0.1);
}
.btn-reply-tab {
background: #f0f2f5;
border: 2px solid transparent;
padding: 6px 14px;
border-radius: 8px;
font-size: 0.82rem;
font-weight: 600;
cursor: pointer;
color: #888;
transition: all 0.15s;
}
.btn-reply-tab:hover {
color: #555;
background: #e8ebf0;
}
.btn-reply-tab.active {
color: #0f3460;
background: #fff;
border-color: #0f3460;
}
/* Changelog */
.nowrap {
white-space: nowrap;
}
.text-muted {
color: #999;
font-size: 0.85rem;
}