:root { --primary-color: #0f3460; --primary-dark: #16213e; --primary-light: color-mix(in srgb, var(--primary-color) 10%, white); --primary-hover: color-mix(in srgb, var(--primary-color) 85%, black); } * { 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, var(--primary-color), var(--primary-dark)); } .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: var(--primary-color); } .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: var(--primary-color); } .login-box button { width: 100%; padding: 12px; background: var(--primary-color); color: #fff; border: none; border-radius: 8px; font-size: 1rem; cursor: pointer; transition: background 0.2s; } .login-box button:hover { background: var(--primary-dark); } .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: var(--primary-color); 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: var(--primary-color); 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: #fff; color: #333; padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; box-shadow: 0 1px 4px rgba(0,0,0,0.06); 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; color: #333; } .header-left h1 { font-size: 1.3rem; letter-spacing: -0.3px; color: #222; } .subtitle { font-size: 0.8rem; opacity: 0.6; color: #666; } .header-right { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; } .header-right .btn-secondary, .header-right .btn-primary { padding: 6px 12px; font-size: 0.82rem; } .user-info { font-size: 0.85rem; opacity: 0.7; color: #555; padding-right: 0.5rem; border-right: 1px solid rgba(255,255,255,0.2); } .user-info:hover { opacity: 1; text-decoration: underline; } .btn-profile-icon { padding: 4px 8px !important; font-size: 0.9rem !important; min-width: unset; } /* 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: var(--primary-color); 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: var(--primary-color); } .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: var(--primary-color); } .speed-bar { display: inline-block; height: 5px; background: #d5dbe5; border-radius: 3px; flex-shrink: 0; } .speed-item.top .speed-bar { background: var(--primary-color); } /* 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: var(--primary-color); 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: var(--primary-dark); 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: var(--primary-color); } .prices-hidden .price-cell { filter: blur(6px); user-select: none; transition: filter 0.2s; } .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: var(--primary-color); } /* 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: var(--primary-color); border: 2px solid var(--primary-color); padding: 8px 18px; border-radius: 8px; cursor: pointer; font-size: 0.9rem; transition: all 0.2s; } .btn-secondary:hover { background: var(--primary-color); color: #fff; } .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: var(--primary-color); } .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: var(--primary-color); 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: var(--primary-color); 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: var(--primary-color); } .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: var(--primary-color); } /* 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: var(--primary-color); 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: var(--primary-color); 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: var(--primary-color); margin-bottom: 0.4rem; text-transform: uppercase; letter-spacing: 0.5px; } .liittyma-total { text-align: right; font-weight: 700; font-size: 0.95rem; color: var(--primary-color); 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: var(--primary-color); 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: var(--primary-color); 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: rgba(255,255,255,0.7); cursor: pointer; transition: all 0.2s; } .tab:hover { color: #fff; background: rgba(255,255,255,0.1); } .tab.active { color: #fff; border-bottom-color: #fff; background: rgba(255,255,255,0.1); } .tab-content { display: none; } .tab-content.active { display: block; } /* Sub-tabs (Tekniikka yms.) */ .sub-tab-bar { display: flex; gap: 0; background: #f0f2f5; border-bottom: 2px solid #e0e0e0; padding: 0 1rem; } .sub-tab { padding: 0.6rem 1.1rem; background: none; border: none; border-bottom: 3px solid transparent; font-size: 0.84rem; font-weight: 600; color: #666; cursor: pointer; transition: all 0.2s; } .sub-tab:hover { color: var(--primary-color); background: rgba(0,0,0,0.03); } .sub-tab.active { color: var(--primary-color); border-bottom-color: var(--primary-color); } .sub-tab-content { display: none; } .sub-tab-content.active { display: block; } /* IPAM tila-badget */ .ipam-tila { display:inline-block; padding:2px 10px; border-radius:12px; font-size:0.8rem; font-weight:600; } .ipam-tila-vapaa { background:#e6f9ee; color:#1a7d42; } .ipam-tila-varattu { background:#fef3cd; color:#856404; } .ipam-tila-reserved { background:#e2e3e5; color:#495057; } /* 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-superadmin { background: #7c3aed; color: #fff; } .role-admin { background: var(--primary-color); 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 type badges */ .ticket-type { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; } .ticket-type-laskutus { background: #e8f5e9; color: #2e7d32; } .ticket-type-tekniikka { background: #e3f2fd; color: #1565c0; } .ticket-type-vika { background: #fce4ec; color: #c62828; } .ticket-type-muu { background: #f5f5f5; color: #757575; } /* Active (käsittelyssä) ticket row — green tint */ .ticket-row-active { background: #e8f8e8 !important; } .ticket-row-active:hover { background: #d5f0d5 !important; } .ticket-row-urgent { background: #fef2f2 !important; border-left: 3px solid #e74c3c !important; } .ticket-row-urgent:hover { background: #fee2e2 !important; } .ticket-row-important { background: #fffbeb !important; border-left: 3px solid #f59e0b !important; } .ticket-row-important:hover { background: #fef3c7 !important; } .ticket-prio-urgent { font-size: 0.9rem; } .ticket-prio-important { font-size: 0.9rem; } /* 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: var(--primary-color); 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: var(--primary-color); background: #fff; border-color: var(--primary-color); } /* Ticket tags */ .ticket-tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 0.72rem; font-weight: 600; background: #e8ebf0; color: #555; white-space: nowrap; letter-spacing: 0.2px; } .ticket-tag-editable { display: inline-flex; align-items: center; gap: 3px; padding: 3px 6px 3px 8px; cursor: default; } .ticket-tag-remove { background: none; border: none; cursor: pointer; font-size: 0.85rem; color: #999; padding: 0 2px; line-height: 1; border-radius: 3px; transition: color 0.15s, background 0.15s; } .ticket-tag-remove:hover { color: #e74c3c; background: rgba(231, 76, 60, 0.1); } /* Changelog */ .nowrap { white-space: nowrap; } .text-muted { color: #999; font-size: 0.85rem; } /* Company selector */ .company-selector { padding: 6px 10px; border: 1px solid #d0d5dd; border-radius: 6px; font-size: 0.82rem; font-weight: 600; color: var(--primary-color); background: #fff; cursor: pointer; transition: border-color 0.2s; } .company-selector:hover, .company-selector:focus { border-color: var(--primary-color); outline: none; } /* Mailbox items */ .mailbox-item { transition: border-color 0.2s; } .mailbox-item:hover { border-color: var(--primary-color) !important; } /* Company badge */ .company-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; background: #e8f0fe; color: #1a56db; }