.app-loading {
    position: absolute;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #005970;
    background: rgba(231, 240, 242, .96);
}

.app-loading .spinner-border {
    width: 2.5rem;
    height: 2.5rem;
    color: #ff6600;
}

.auth-screen {
    min-height: 100%;
    overflow-y: auto;
    padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
    background: linear-gradient(155deg, #005970 0, #053744 42%, #e7f0f2 42%);
}

.auth-brand {
    color: #fff;
    text-align: center;
    margin: 28px 0 34px;
}

.auth-logo {
    width: 74px;
    height: 74px;
    margin: 0 auto 14px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    color: #fff;
    background: #ff6600;
    font-size: 34px;
    box-shadow: 0 12px 28px rgba(0,0,0,.2);
}

.auth-card {
    border: 0;
    border-radius: 22px;
    box-shadow: 0 18px 45px rgba(6,39,52,.18);
}

.auth-card .form-control,
.auth-card .form-select {
    min-height: 48px;
    border-radius: 12px;
}

.auth-card .btn-kom {
    min-height: 46px;
}

.privacy-note {
    color: #66828c;
    font-size: 12px;
    line-height: 1.45;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.server-error {
    font-size: 13px;
}

.msg-tools {
    margin-top: 4px;
    text-align: right;
}

.msg-tools button {
    border: 0;
    padding: 0 3px;
    color: #66828c;
    background: transparent;
    font-size: 11px;
}

.reply-compose {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    color: #005970;
    background: #fff7f0;
    border-top: 1px solid #ffd1b3;
    font-size: 12px;
}

.runtime-actions {
    display: flex;
    gap: 6px;
    padding: 8px 10px;
    background: #f7fbfc;
    border-bottom: 1px solid #c4d7dc;
    overflow-x: auto;
}

.runtime-actions .btn {
    white-space: nowrap;
}

.search-result-section {
    padding: 8px 10px 2px;
    color: #66828c;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.call-screen {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    color: #fff;
    background: #062734;
}

.call-grid {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(150px, 1fr);
    gap: 8px;
    padding: 8px;
    overflow-y: auto;
}

.video-tile {
    position: relative;
    min-height: 150px;
    overflow: hidden;
    border-radius: 16px;
    background: #0b4554;
}

.video-tile video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #041d25;
}

.video-label {
    position: absolute;
    left: 8px;
    bottom: 8px;
    max-width: calc(100% - 16px);
    padding: 3px 8px;
    border-radius: 10px;
    background: rgba(0,0,0,.55);
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.call-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 14px 10px calc(14px + env(safe-area-inset-bottom));
    background: #053744;
}

.call-control {
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: #005970;
    font-size: 21px;
}

.call-control.off,
.call-control.hangup {
    background: #dc3545;
}

.whiteboard-shell {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #eef5f6;
}

.whiteboard-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #fff;
    border-bottom: 1px solid #c4d7dc;
}

.whiteboard-stage {
    flex: 1;
    min-height: 0;
    padding: 8px;
}

.whiteboard-toolbar input[type="color"] {
    width: 42px;
    height: 34px;
    padding: 2px;
    border: 1px solid #c4d7dc;
    border-radius: 8px;
}

.whiteboard-stage {
    flex: 1;
    min-height: 0;
    padding: 8px;
}

#whiteboardCanvas {
    width: 100%;
    height: 100%;
    display: block;
    touch-action: none;
    background: #fff;
    border-radius: 12px;
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
    border: 1px solid #c4d7dc;
    border-radius: 12px;
    background: #fff;
}

@media (max-width: 520px) {
    .call-grid { grid-template-columns: 1fr; }
}
